/* * 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); option value='emaclite-cleanup'>emaclite-cleanup net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
href='/cgit.cgi/linux/net-next.git/diff/drivers/usb/gadget/function?id=189addce85330208bea50ea7f1483b58822e93cf&id2=930a42ded3fede7ca3acafc9153f4f2d0f56a92c'>function/f_rndis.c
diff options
AgeCommit message (Expand)AuthorFilesLines
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/function/f_rndis.c')