aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/chips/pcf50633.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/chips/pcf50633.c')
-rw-r--r--drivers/i2c/chips/pcf50633.c14
1 files changed, 8 insertions, 6 deletions
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