diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/adb.c | 14 | ||||
-rw-r--r-- | drivers/macintosh/adbhid.c | 7 | ||||
-rw-r--r-- | drivers/macintosh/mediabay.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/smu.c | 9 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu68k.c | 7 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_core.c | 8 |
7 files changed, 29 insertions, 22 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 | ||
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index c0b46bceb5df..394334ec5765 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c | |||
@@ -1206,15 +1206,16 @@ init_ms_a3(int id) | |||
1206 | static int __init adbhid_init(void) | 1206 | static int __init adbhid_init(void) |
1207 | { | 1207 | { |
1208 | #ifndef CONFIG_MAC | 1208 | #ifndef CONFIG_MAC |
1209 | if ( (_machine != _MACH_chrp) && (_machine != _MACH_Pmac) ) | 1209 | if (!machine_is(chrp) && !machine_is(powermac)) |
1210 | return 0; | 1210 | return 0; |
1211 | #endif | 1211 | #endif |
1212 | 1212 | ||
1213 | led_request.complete = 1; | 1213 | led_request.complete = 1; |
1214 | 1214 | ||
1215 | adbhid_probe(); | 1215 | adbhid_probe(); |
1216 | 1216 | ||
1217 | notifier_chain_register(&adb_client_list, &adbhid_adb_notifier); | 1217 | blocking_notifier_chain_register(&adb_client_list, |
1218 | &adbhid_adb_notifier); | ||
1218 | 1219 | ||
1219 | return 0; | 1220 | return 0; |
1220 | } | 1221 | } |
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 8dbf2852bae0..53c1c7909413 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
@@ -839,8 +839,8 @@ static int __init media_bay_init(void) | |||
839 | media_bays[i].cd_index = -1; | 839 | media_bays[i].cd_index = -1; |
840 | #endif | 840 | #endif |
841 | } | 841 | } |
842 | if (_machine != _MACH_Pmac) | 842 | if (!machine_is(powermac)) |
843 | return -ENODEV; | 843 | return 0; |
844 | 844 | ||
845 | macio_register_driver(&media_bay_driver); | 845 | macio_register_driver(&media_bay_driver); |
846 | 846 | ||
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 4eb05d7143d8..f4516ca7aa3a 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/sysdev.h> | 36 | #include <linux/sysdev.h> |
37 | #include <linux/poll.h> | 37 | #include <linux/poll.h> |
38 | #include <linux/mutex.h> | ||
38 | 39 | ||
39 | #include <asm/byteorder.h> | 40 | #include <asm/byteorder.h> |
40 | #include <asm/io.h> | 41 | #include <asm/io.h> |
@@ -92,7 +93,7 @@ struct smu_device { | |||
92 | * for now, just hard code that | 93 | * for now, just hard code that |
93 | */ | 94 | */ |
94 | static struct smu_device *smu; | 95 | static struct smu_device *smu; |
95 | static DECLARE_MUTEX(smu_part_access); | 96 | static DEFINE_MUTEX(smu_part_access); |
96 | 97 | ||
97 | static void smu_i2c_retry(unsigned long data); | 98 | static void smu_i2c_retry(unsigned long data); |
98 | 99 | ||
@@ -976,11 +977,11 @@ struct smu_sdbp_header *__smu_get_sdb_partition(int id, unsigned int *size, | |||
976 | 977 | ||
977 | if (interruptible) { | 978 | if (interruptible) { |
978 | int rc; | 979 | int rc; |
979 | rc = down_interruptible(&smu_part_access); | 980 | rc = mutex_lock_interruptible(&smu_part_access); |
980 | if (rc) | 981 | if (rc) |
981 | return ERR_PTR(rc); | 982 | return ERR_PTR(rc); |
982 | } else | 983 | } else |
983 | down(&smu_part_access); | 984 | mutex_lock(&smu_part_access); |
984 | 985 | ||
985 | part = (struct smu_sdbp_header *)get_property(smu->of_node, | 986 | part = (struct smu_sdbp_header *)get_property(smu->of_node, |
986 | pname, size); | 987 | pname, size); |
@@ -990,7 +991,7 @@ struct smu_sdbp_header *__smu_get_sdb_partition(int id, unsigned int *size, | |||
990 | if (part != NULL && size) | 991 | if (part != NULL && size) |
991 | *size = part->len << 2; | 992 | *size = part->len << 2; |
992 | } | 993 | } |
993 | up(&smu_part_access); | 994 | mutex_unlock(&smu_part_access); |
994 | return part; | 995 | return part; |
995 | } | 996 | } |
996 | 997 | ||
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 4f5f3abc9cb3..0b5ff553e39a 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -187,7 +187,7 @@ extern int disable_kernel_backlight; | |||
187 | 187 | ||
188 | int __fake_sleep; | 188 | int __fake_sleep; |
189 | int asleep; | 189 | int asleep; |
190 | struct notifier_block *sleep_notifier_list; | 190 | BLOCKING_NOTIFIER_HEAD(sleep_notifier_list); |
191 | 191 | ||
192 | #ifdef CONFIG_ADB | 192 | #ifdef CONFIG_ADB |
193 | static int adb_dev_map = 0; | 193 | static int adb_dev_map = 0; |
diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c index f08e52f2107b..35b70323e7e3 100644 --- a/drivers/macintosh/via-pmu68k.c +++ b/drivers/macintosh/via-pmu68k.c | |||
@@ -102,7 +102,7 @@ static int pmu_kind = PMU_UNKNOWN; | |||
102 | static int pmu_fully_inited = 0; | 102 | static int pmu_fully_inited = 0; |
103 | 103 | ||
104 | int asleep; | 104 | int asleep; |
105 | struct notifier_block *sleep_notifier_list; | 105 | BLOCKING_NOTIFIER_HEAD(sleep_notifier_list); |
106 | 106 | ||
107 | static int pmu_probe(void); | 107 | static int pmu_probe(void); |
108 | static int pmu_init(void); | 108 | static int pmu_init(void); |
@@ -913,7 +913,8 @@ int powerbook_sleep(void) | |||
913 | struct adb_request sleep_req; | 913 | struct adb_request sleep_req; |
914 | 914 | ||
915 | /* Notify device drivers */ | 915 | /* Notify device drivers */ |
916 | ret = notifier_call_chain(&sleep_notifier_list, PBOOK_SLEEP, NULL); | 916 | ret = blocking_notifier_call_chain(&sleep_notifier_list, |
917 | PBOOK_SLEEP, NULL); | ||
917 | if (ret & NOTIFY_STOP_MASK) | 918 | if (ret & NOTIFY_STOP_MASK) |
918 | return -EBUSY; | 919 | return -EBUSY; |
919 | 920 | ||
@@ -984,7 +985,7 @@ int powerbook_sleep(void) | |||
984 | enable_irq(i); | 985 | enable_irq(i); |
985 | 986 | ||
986 | /* Notify drivers */ | 987 | /* Notify drivers */ |
987 | notifier_call_chain(&sleep_notifier_list, PBOOK_WAKE, NULL); | 988 | blocking_notifier_call_chain(&sleep_notifier_list, PBOOK_WAKE, NULL); |
988 | 989 | ||
989 | /* reenable ADB autopoll */ | 990 | /* reenable ADB autopoll */ |
990 | pmu_adb_autopoll(adb_dev_map); | 991 | pmu_adb_autopoll(adb_dev_map); |
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c index 6c0ba04bc57a..ab3faa702d58 100644 --- a/drivers/macintosh/windfarm_core.c +++ b/drivers/macintosh/windfarm_core.c | |||
@@ -52,7 +52,7 @@ | |||
52 | static LIST_HEAD(wf_controls); | 52 | static LIST_HEAD(wf_controls); |
53 | static LIST_HEAD(wf_sensors); | 53 | static LIST_HEAD(wf_sensors); |
54 | static DEFINE_MUTEX(wf_lock); | 54 | static DEFINE_MUTEX(wf_lock); |
55 | static struct notifier_block *wf_client_list; | 55 | static BLOCKING_NOTIFIER_HEAD(wf_client_list); |
56 | static int wf_client_count; | 56 | static int wf_client_count; |
57 | static unsigned int wf_overtemp; | 57 | static unsigned int wf_overtemp; |
58 | static unsigned int wf_overtemp_counter; | 58 | static unsigned int wf_overtemp_counter; |
@@ -68,7 +68,7 @@ static struct platform_device wf_platform_device = { | |||
68 | 68 | ||
69 | static inline void wf_notify(int event, void *param) | 69 | static inline void wf_notify(int event, void *param) |
70 | { | 70 | { |
71 | notifier_call_chain(&wf_client_list, event, param); | 71 | blocking_notifier_call_chain(&wf_client_list, event, param); |
72 | } | 72 | } |
73 | 73 | ||
74 | int wf_critical_overtemp(void) | 74 | int wf_critical_overtemp(void) |
@@ -398,7 +398,7 @@ int wf_register_client(struct notifier_block *nb) | |||
398 | struct wf_sensor *sr; | 398 | struct wf_sensor *sr; |
399 | 399 | ||
400 | mutex_lock(&wf_lock); | 400 | mutex_lock(&wf_lock); |
401 | rc = notifier_chain_register(&wf_client_list, nb); | 401 | rc = blocking_notifier_chain_register(&wf_client_list, nb); |
402 | if (rc != 0) | 402 | if (rc != 0) |
403 | goto bail; | 403 | goto bail; |
404 | wf_client_count++; | 404 | wf_client_count++; |
@@ -417,7 +417,7 @@ EXPORT_SYMBOL_GPL(wf_register_client); | |||
417 | int wf_unregister_client(struct notifier_block *nb) | 417 | int wf_unregister_client(struct notifier_block *nb) |
418 | { | 418 | { |
419 | mutex_lock(&wf_lock); | 419 | mutex_lock(&wf_lock); |
420 | notifier_chain_unregister(&wf_client_list, nb); | 420 | blocking_notifier_chain_unregister(&wf_client_list, nb); |
421 | wf_client_count++; | 421 | wf_client_count++; |
422 | if (wf_client_count == 0) | 422 | if (wf_client_count == 0) |
423 | wf_stop_thread(); | 423 | wf_stop_thread(); |