diff options
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/chips/pcf50606.c | 9 | ||||
-rw-r--r-- | drivers/i2c/chips/pcf50633.c | 14 |
2 files changed, 13 insertions, 10 deletions
diff --git a/drivers/i2c/chips/pcf50606.c b/drivers/i2c/chips/pcf50606.c index 4218917567b..93dd4b869bf 100644 --- a/drivers/i2c/chips/pcf50606.c +++ b/drivers/i2c/chips/pcf50606.c @@ -672,8 +672,9 @@ static void pcf50606_work(struct work_struct *work) * which is very bad. Therefore we confirm * PID #1 exists before issuing the signal */ - if (find_task_by_pid(1)) { - kill_proc(1, SIGINT, 1); + if (find_task_by_pid_ns(1, &init_pid_ns)) { + kill_pid(task_pid(find_task_by_pid_ns(1, + &init_pid_ns)), SIGINT, 1); DEBUGPC("SIGINT(init) "); } /* FIXME: what to do if userspace doesn't @@ -787,10 +788,10 @@ static void pcf50606_work(struct work_struct *work) * very bad. Therefore we confirm PID #1 exists * before issuing SPIGPWR */ - if (find_task_by_pid(1)) { + if (find_task_by_pid_ns(1, &init_pid_ns)) { apm_queue_event(APM_LOW_BATTERY); DEBUGPC("SIGPWR(init) "); - kill_proc(1, SIGPWR, 1); + kill_pid(task_pid(find_task_by_pid_ns(1, &init_pid_ns)), SIGPWR, 1); } else /* * well, our situation is like this: we do not diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c index 01ffa1dc543..86ec6eb9c60 100644 --- a/drivers/i2c/chips/pcf50633.c +++ b/drivers/i2c/chips/pcf50633.c @@ -966,9 +966,10 @@ static void pcf50633_work(struct work_struct *work) * which is very bad. Therefore we confirm * PID #1 exists before issuing the signal */ - if (find_task_by_pid(1)) { + if (find_task_by_pid_ns(1, &init_pid_ns)) { + kill_pid(task_pid(find_task_by_pid_ns(1, + &init_pid_ns)), SIGPWR, 1); DEBUGPC("SIGINT(init) "); - kill_proc(1, SIGINT, 1); } /* FIXME: what if userspace doesn't shut down? */ } @@ -1153,10 +1154,11 @@ static void pcf50633_work(struct work_struct *work) * very bad. Therefore we confirm PID #1 exists * before issuing SPIGPWR */ - if (find_task_by_pid(1)) { - apm_queue_event(APM_LOW_BATTERY); - DEBUGPC("SIGPWR(init) "); - kill_proc(1, SIGPWR, 1); + + if (find_task_by_pid_ns(1, &init_pid_ns)) { + apm_queue_event(APM_LOW_BATTERY); + DEBUGPC("SIGPWR(init) "); + kill_pid(task_pid(find_task_by_pid_ns(1, &init_pid_ns)), SIGPWR, 1); } else /* * well, our situation is like this: we do not |