/* * poweroff.c - sysrq handler to gracefully power down machine. * * This file is released under the GPL v2 */ #include #include #include #include #include #include #include /* * When the user hits Sys-Rq o to power down the machine this is the * callback we use. */ static void do_poweroff(struct work_struct *dummy) { kernel_power_off(); } static DECLARE_WORK(poweroff_work, do_poweroff); static void handle_poweroff(int key) { /* run sysrq poweroff on boot cpu */ schedule_work_on(cpumask_first(cpu_online_mask), &poweroff_work); } static struct sysrq_key_op sysrq_poweroff_op = { .handler = handle_poweroff, .help_msg = "poweroff(o)", .action_msg = "Power Off", .enable_mask = SYSRQ_ENABLE_BOOT, }; static int __init pm_sysrq_init(void) { register_sysrq_key('o', &sysrq_poweroff_op); return 0; } subsys_initcall(pm_sysrq_init); 'id' value='424414947da3dd5cb0d60e4f299f7c51e472ae77'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/net/iucv
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-03 22:19:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-03 22:19:15 +0100
commit424414947da3dd5cb0d60e4f299f7c51e472ae77 (patch)
treea4067480c4256c80ae8f8438a3e4bb88e32050bc /net/iucv
parenta3683e0c1410c5c8136a7a93b0336ce88d3b893a (diff)
parentd07830db1bdb254e4b50d366010b219286b8c937 (diff)
Merge tag 'usb-serial-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes: USB-serial fixes for v4.10-rc7 One more device ID for pl2303. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'net/iucv')