diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/Kconfig | 1 | ||||
-rw-r--r-- | drivers/macintosh/adbhid.c | 16 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_core.c | 10 |
3 files changed, 16 insertions, 11 deletions
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index 58926da0ae18..f44c94abd883 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig | |||
@@ -113,7 +113,6 @@ config PMAC_SMU | |||
113 | 113 | ||
114 | config PMAC_APM_EMU | 114 | config PMAC_APM_EMU |
115 | tristate "APM emulation" | 115 | tristate "APM emulation" |
116 | select SYS_SUPPORTS_APM_EMULATION | ||
117 | select APM_EMULATION | 116 | select APM_EMULATION |
118 | depends on ADB_PMU && PM | 117 | depends on ADB_PMU && PM |
119 | 118 | ||
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index b77ef5187d6d..b46817f699f1 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c | |||
@@ -628,16 +628,16 @@ static void real_leds(unsigned char leds, int device) | |||
628 | */ | 628 | */ |
629 | static int adbhid_kbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) | 629 | static int adbhid_kbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) |
630 | { | 630 | { |
631 | struct adbhid *adbhid = dev->private; | 631 | struct adbhid *adbhid = input_get_drvdata(dev); |
632 | unsigned char leds; | 632 | unsigned char leds; |
633 | 633 | ||
634 | switch (type) { | 634 | switch (type) { |
635 | case EV_LED: | 635 | case EV_LED: |
636 | leds = (test_bit(LED_SCROLLL, dev->led) ? 4 : 0) | 636 | leds = (test_bit(LED_SCROLLL, dev->led) ? 4 : 0) | |
637 | | (test_bit(LED_NUML, dev->led) ? 1 : 0) | 637 | (test_bit(LED_NUML, dev->led) ? 1 : 0) | |
638 | | (test_bit(LED_CAPSL, dev->led) ? 2 : 0); | 638 | (test_bit(LED_CAPSL, dev->led) ? 2 : 0); |
639 | real_leds(leds, adbhid->id); | 639 | real_leds(leds, adbhid->id); |
640 | return 0; | 640 | return 0; |
641 | } | 641 | } |
642 | 642 | ||
643 | return -1; | 643 | return -1; |
@@ -649,7 +649,7 @@ adb_message_handler(struct notifier_block *this, unsigned long code, void *x) | |||
649 | switch (code) { | 649 | switch (code) { |
650 | case ADB_MSG_PRE_RESET: | 650 | case ADB_MSG_PRE_RESET: |
651 | case ADB_MSG_POWERDOWN: | 651 | case ADB_MSG_POWERDOWN: |
652 | /* Stop the repeat timer. Autopoll is already off at this point */ | 652 | /* Stop the repeat timer. Autopoll is already off at this point */ |
653 | { | 653 | { |
654 | int i; | 654 | int i; |
655 | for (i = 1; i < 16; i++) { | 655 | for (i = 1; i < 16; i++) { |
@@ -699,7 +699,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id, | |||
699 | hid->current_handler_id = current_handler_id; | 699 | hid->current_handler_id = current_handler_id; |
700 | hid->mouse_kind = mouse_kind; | 700 | hid->mouse_kind = mouse_kind; |
701 | hid->flags = 0; | 701 | hid->flags = 0; |
702 | input_dev->private = hid; | 702 | input_set_drvdata(input_dev, hid); |
703 | input_dev->name = hid->name; | 703 | input_dev->name = hid->name; |
704 | input_dev->phys = hid->phys; | 704 | input_dev->phys = hid->phys; |
705 | input_dev->id.bustype = BUS_ADB; | 705 | input_dev->id.bustype = BUS_ADB; |
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c index 192b26e97777..11ced17f438a 100644 --- a/drivers/macintosh/windfarm_core.c +++ b/drivers/macintosh/windfarm_core.c | |||
@@ -216,7 +216,10 @@ int wf_register_control(struct wf_control *new_ct) | |||
216 | new_ct->attr.attr.mode = 0644; | 216 | new_ct->attr.attr.mode = 0644; |
217 | new_ct->attr.show = wf_show_control; | 217 | new_ct->attr.show = wf_show_control; |
218 | new_ct->attr.store = wf_store_control; | 218 | new_ct->attr.store = wf_store_control; |
219 | device_create_file(&wf_platform_device.dev, &new_ct->attr); | 219 | if (device_create_file(&wf_platform_device.dev, &new_ct->attr)) |
220 | printk(KERN_WARNING "windfarm: device_create_file failed" | ||
221 | " for %s\n", new_ct->name); | ||
222 | /* the subsystem still does useful work without the file */ | ||
220 | 223 | ||
221 | DBG("wf: Registered control %s\n", new_ct->name); | 224 | DBG("wf: Registered control %s\n", new_ct->name); |
222 | 225 | ||
@@ -326,7 +329,10 @@ int wf_register_sensor(struct wf_sensor *new_sr) | |||
326 | new_sr->attr.attr.mode = 0444; | 329 | new_sr->attr.attr.mode = 0444; |
327 | new_sr->attr.show = wf_show_sensor; | 330 | new_sr->attr.show = wf_show_sensor; |
328 | new_sr->attr.store = NULL; | 331 | new_sr->attr.store = NULL; |
329 | device_create_file(&wf_platform_device.dev, &new_sr->attr); | 332 | if (device_create_file(&wf_platform_device.dev, &new_sr->attr)) |
333 | printk(KERN_WARNING "windfarm: device_create_file failed" | ||
334 | " for %s\n", new_sr->name); | ||
335 | /* the subsystem still does useful work without the file */ | ||
330 | 336 | ||
331 | DBG("wf: Registered sensor %s\n", new_sr->name); | 337 | DBG("wf: Registered sensor %s\n", new_sr->name); |
332 | 338 | ||