From 822c4eb3afe23cefc46a9da6c8e8fc24d443c330 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 19 Nov 2008 17:10:00 +0000 Subject: tracking-2.6.27-rc1-pcf50306-defs.patch Signed-off-by: Andy Green --- drivers/i2c/chips/pcf50606.c | 9 +++++---- drivers/i2c/chips/pcf50633.c | 14 ++++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'drivers/i2c') 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 -- cgit v1.2.3