Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / drivers / char / snsc_event.c
index 8b2210b..1b75b0b 100644 (file)
@@ -36,7 +36,7 @@ DECLARE_TASKLET(sn_sysctl_event, scdrv_event, 0);
  * destination.
  */
 static irqreturn_t
-scdrv_event_interrupt(int irq, void *subch_data, struct pt_regs *regs)
+scdrv_event_interrupt(int irq, void *subch_data)
 {
        struct subch_data_s *sd = subch_data;
        unsigned long flags;
@@ -203,8 +203,6 @@ scdrv_dispatch_event(char *event, int len)
        class = (code & EV_CLASS_MASK);
 
        if (class == EV_CLASS_PWRD_NOTIFY || code == ENV_PWRDN_PEND) {
-               struct task_struct *p;
-
                if (snsc_shutting_down)
                        return;
 
@@ -220,20 +218,7 @@ scdrv_dispatch_event(char *event, int len)
                               " Sending SIGPWR to init...\n");
 
                /* give a SIGPWR signal to init proc */
-
-               /* first find init's task */
-               read_lock(&tasklist_lock);
-               for_each_process(p) {
-                       if (p->pid == 1)
-                               break;
-               }
-               if (p) {
-                       force_sig(SIGPWR, p);
-               } else {
-                       printk(KERN_ERR "Failed to signal init!\n");
-                       snsc_shutting_down = 0; /* so can try again (?) */
-               }
-               read_unlock(&tasklist_lock);
+               kill_cad_pid(SIGPWR, 0);
        } else {
                /* print to system log */
                printk("%s|$(0x%x)%s\n", severity, esp_code, desc);