diff options
Diffstat (limited to 'drivers/macintosh/adb.c')
-rw-r--r-- | drivers/macintosh/adb.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index d2ead1776c16..259fd8973ce9 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/semaphore.h> | 42 | #include <asm/semaphore.h> |
43 | #ifdef CONFIG_PPC | 43 | #ifdef CONFIG_PPC |
44 | #include <asm/prom.h> | 44 | #include <asm/prom.h> |
45 | #include <asm/machdep.h> | ||
45 | #endif | 46 | #endif |
46 | 47 | ||
47 | 48 | ||
@@ -80,7 +81,7 @@ static struct adb_driver *adb_driver_list[] = { | |||
80 | static struct class *adb_dev_class; | 81 | static struct class *adb_dev_class; |
81 | 82 | ||
82 | struct adb_driver *adb_controller; | 83 | struct adb_driver *adb_controller; |
83 | struct notifier_block *adb_client_list = NULL; | 84 | BLOCKING_NOTIFIER_HEAD(adb_client_list); |
84 | static int adb_got_sleep; | 85 | static int adb_got_sleep; |
85 | static int adb_inited; | 86 | static int adb_inited; |
86 | static pid_t adb_probe_task_pid; | 87 | static pid_t adb_probe_task_pid; |
@@ -294,7 +295,7 @@ int __init adb_init(void) | |||
294 | int i; | 295 | int i; |
295 | 296 | ||
296 | #ifdef CONFIG_PPC32 | 297 | #ifdef CONFIG_PPC32 |
297 | if ( (_machine != _MACH_chrp) && (_machine != _MACH_Pmac) ) | 298 | if (!machine_is(chrp) && !machine_is(powermac)) |
298 | return 0; | 299 | return 0; |
299 | #endif | 300 | #endif |
300 | #ifdef CONFIG_MAC | 301 | #ifdef CONFIG_MAC |
@@ -354,7 +355,8 @@ adb_notify_sleep(struct pmu_sleep_notifier *self, int when) | |||
354 | /* Stop autopoll */ | 355 | /* Stop autopoll */ |
355 | if (adb_controller->autopoll) | 356 | if (adb_controller->autopoll) |
356 | adb_controller->autopoll(0); | 357 | adb_controller->autopoll(0); |
357 | ret = notifier_call_chain(&adb_client_list, ADB_MSG_POWERDOWN, NULL); | 358 | ret = blocking_notifier_call_chain(&adb_client_list, |
359 | ADB_MSG_POWERDOWN, NULL); | ||
358 | if (ret & NOTIFY_STOP_MASK) { | 360 | if (ret & NOTIFY_STOP_MASK) { |
359 | up(&adb_probe_mutex); | 361 | up(&adb_probe_mutex); |
360 | return PBOOK_SLEEP_REFUSE; | 362 | return PBOOK_SLEEP_REFUSE; |
@@ -391,7 +393,8 @@ do_adb_reset_bus(void) | |||
391 | if (adb_controller->autopoll) | 393 | if (adb_controller->autopoll) |
392 | adb_controller->autopoll(0); | 394 | adb_controller->autopoll(0); |
393 | 395 | ||
394 | nret = notifier_call_chain(&adb_client_list, ADB_MSG_PRE_RESET, NULL); | 396 | nret = blocking_notifier_call_chain(&adb_client_list, |
397 | ADB_MSG_PRE_RESET, NULL); | ||
395 | if (nret & NOTIFY_STOP_MASK) { | 398 | if (nret & NOTIFY_STOP_MASK) { |
396 | if (adb_controller->autopoll) | 399 | if (adb_controller->autopoll) |
397 | adb_controller->autopoll(autopoll_devs); | 400 | adb_controller->autopoll(autopoll_devs); |
@@ -426,7 +429,8 @@ do_adb_reset_bus(void) | |||
426 | } | 429 | } |
427 | up(&adb_handler_sem); | 430 | up(&adb_handler_sem); |
428 | 431 | ||
429 | nret = notifier_call_chain(&adb_client_list, ADB_MSG_POST_RESET, NULL); | 432 | nret = blocking_notifier_call_chain(&adb_client_list, |
433 | ADB_MSG_POST_RESET, NULL); | ||
430 | if (nret & NOTIFY_STOP_MASK) | 434 | if (nret & NOTIFY_STOP_MASK) |
431 | return -EBUSY; | 435 | return -EBUSY; |
432 | 436 | ||