aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:10:00 +0000
committerAndy Green <andy@openmoko.com>2008-11-19 17:10:00 +0000
commit822c4eb3afe23cefc46a9da6c8e8fc24d443c330 (patch)
treeaaeb707040b1f38bbca8df70b62c1eecb353ccb2 /drivers/i2c
parent4e3487310bcb772ffd5974112dd729dcf2227fe8 (diff)
tracking-2.6.27-rc1-pcf50306-defs.patch
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/chips/pcf50606.c9
-rw-r--r--drivers/i2c/chips/pcf50633.c14
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