diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/adb-iop.c | 1 | ||||
-rw-r--r-- | drivers/macintosh/adbhid.c | 21 | ||||
-rw-r--r-- | drivers/macintosh/ans-lcd.c | 3 | ||||
-rw-r--r-- | drivers/macintosh/ans-lcd.h | 11 | ||||
-rw-r--r-- | drivers/macintosh/therm_adt746x.c | 5 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_smu_sat.c | 2 |
7 files changed, 27 insertions, 18 deletions
diff --git a/drivers/macintosh/adb-iop.c b/drivers/macintosh/adb-iop.c index 17ef5d3c01b4..444696625171 100644 --- a/drivers/macintosh/adb-iop.c +++ b/drivers/macintosh/adb-iop.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/proc_fs.h> | 20 | #include <linux/proc_fs.h> |
21 | 21 | ||
22 | #include <asm/bootinfo.h> | ||
23 | #include <asm/macintosh.h> | 22 | #include <asm/macintosh.h> |
24 | #include <asm/macints.h> | 23 | #include <asm/macints.h> |
25 | #include <asm/mac_iop.h> | 24 | #include <asm/mac_iop.h> |
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index b46817f699f1..48d17bf6c927 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c | |||
@@ -70,7 +70,7 @@ static struct notifier_block adbhid_adb_notifier = { | |||
70 | #define ADB_KEY_POWER_OLD 0x7e | 70 | #define ADB_KEY_POWER_OLD 0x7e |
71 | #define ADB_KEY_POWER 0x7f | 71 | #define ADB_KEY_POWER 0x7f |
72 | 72 | ||
73 | u8 adb_to_linux_keycodes[128] = { | 73 | u16 adb_to_linux_keycodes[128] = { |
74 | /* 0x00 */ KEY_A, /* 30 */ | 74 | /* 0x00 */ KEY_A, /* 30 */ |
75 | /* 0x01 */ KEY_S, /* 31 */ | 75 | /* 0x01 */ KEY_S, /* 31 */ |
76 | /* 0x02 */ KEY_D, /* 32 */ | 76 | /* 0x02 */ KEY_D, /* 32 */ |
@@ -134,7 +134,7 @@ u8 adb_to_linux_keycodes[128] = { | |||
134 | /* 0x3c */ KEY_RIGHT, /* 106 */ | 134 | /* 0x3c */ KEY_RIGHT, /* 106 */ |
135 | /* 0x3d */ KEY_DOWN, /* 108 */ | 135 | /* 0x3d */ KEY_DOWN, /* 108 */ |
136 | /* 0x3e */ KEY_UP, /* 103 */ | 136 | /* 0x3e */ KEY_UP, /* 103 */ |
137 | /* 0x3f */ 0, | 137 | /* 0x3f */ KEY_FN, /* 0x1d0 */ |
138 | /* 0x40 */ 0, | 138 | /* 0x40 */ 0, |
139 | /* 0x41 */ KEY_KPDOT, /* 83 */ | 139 | /* 0x41 */ KEY_KPDOT, /* 83 */ |
140 | /* 0x42 */ 0, | 140 | /* 0x42 */ 0, |
@@ -208,7 +208,7 @@ struct adbhid { | |||
208 | int original_handler_id; | 208 | int original_handler_id; |
209 | int current_handler_id; | 209 | int current_handler_id; |
210 | int mouse_kind; | 210 | int mouse_kind; |
211 | unsigned char *keycode; | 211 | u16 *keycode; |
212 | char name[64]; | 212 | char name[64]; |
213 | char phys[32]; | 213 | char phys[32]; |
214 | int flags; | 214 | int flags; |
@@ -275,7 +275,7 @@ static void | |||
275 | adbhid_input_keycode(int id, int keycode, int repeat) | 275 | adbhid_input_keycode(int id, int keycode, int repeat) |
276 | { | 276 | { |
277 | struct adbhid *ahid = adbhid[id]; | 277 | struct adbhid *ahid = adbhid[id]; |
278 | int up_flag; | 278 | int up_flag, key; |
279 | 279 | ||
280 | up_flag = (keycode & 0x80); | 280 | up_flag = (keycode & 0x80); |
281 | keycode &= 0x7f; | 281 | keycode &= 0x7f; |
@@ -321,8 +321,7 @@ adbhid_input_keycode(int id, int keycode, int repeat) | |||
321 | } | 321 | } |
322 | } else | 322 | } else |
323 | ahid->flags |= FLAG_FN_KEY_PRESSED; | 323 | ahid->flags |= FLAG_FN_KEY_PRESSED; |
324 | /* Swallow the key press */ | 324 | break; |
325 | return; | ||
326 | case ADB_KEY_DEL: | 325 | case ADB_KEY_DEL: |
327 | /* Emulate Fn+delete = forward delete */ | 326 | /* Emulate Fn+delete = forward delete */ |
328 | if (ahid->flags & FLAG_FN_KEY_PRESSED) { | 327 | if (ahid->flags & FLAG_FN_KEY_PRESSED) { |
@@ -336,9 +335,9 @@ adbhid_input_keycode(int id, int keycode, int repeat) | |||
336 | #endif /* CONFIG_PPC_PMAC */ | 335 | #endif /* CONFIG_PPC_PMAC */ |
337 | } | 336 | } |
338 | 337 | ||
339 | if (adbhid[id]->keycode[keycode]) { | 338 | key = adbhid[id]->keycode[keycode]; |
340 | input_report_key(adbhid[id]->input, | 339 | if (key) { |
341 | adbhid[id]->keycode[keycode], !up_flag); | 340 | input_report_key(adbhid[id]->input, key, !up_flag); |
342 | input_sync(adbhid[id]->input); | 341 | input_sync(adbhid[id]->input); |
343 | } else | 342 | } else |
344 | printk(KERN_INFO "Unhandled ADB key (scancode %#02x) %s.\n", keycode, | 343 | printk(KERN_INFO "Unhandled ADB key (scancode %#02x) %s.\n", keycode, |
@@ -757,8 +756,8 @@ adbhid_input_register(int id, int default_id, int original_handler_id, | |||
757 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP); | 756 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP); |
758 | input_dev->ledbit[0] = BIT(LED_SCROLLL) | BIT(LED_CAPSL) | BIT(LED_NUML); | 757 | input_dev->ledbit[0] = BIT(LED_SCROLLL) | BIT(LED_CAPSL) | BIT(LED_NUML); |
759 | input_dev->event = adbhid_kbd_event; | 758 | input_dev->event = adbhid_kbd_event; |
760 | input_dev->keycodemax = 127; | 759 | input_dev->keycodemax = KEY_FN; |
761 | input_dev->keycodesize = 1; | 760 | input_dev->keycodesize = sizeof(hid->keycode[0]); |
762 | break; | 761 | break; |
763 | 762 | ||
764 | case ADB_MOUSE: | 763 | case ADB_MOUSE: |
diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c index e54c4d9f6365..73c50bc02095 100644 --- a/drivers/macintosh/ans-lcd.c +++ b/drivers/macintosh/ans-lcd.c | |||
@@ -14,9 +14,10 @@ | |||
14 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
15 | #include <asm/sections.h> | 15 | #include <asm/sections.h> |
16 | #include <asm/prom.h> | 16 | #include <asm/prom.h> |
17 | #include <asm/ans-lcd.h> | ||
18 | #include <asm/io.h> | 17 | #include <asm/io.h> |
19 | 18 | ||
19 | #include "ans-lcd.h" | ||
20 | |||
20 | #define ANSLCD_ADDR 0xf301c000 | 21 | #define ANSLCD_ADDR 0xf301c000 |
21 | #define ANSLCD_CTRL_IX 0x00 | 22 | #define ANSLCD_CTRL_IX 0x00 |
22 | #define ANSLCD_DATA_IX 0x10 | 23 | #define ANSLCD_DATA_IX 0x10 |
diff --git a/drivers/macintosh/ans-lcd.h b/drivers/macintosh/ans-lcd.h new file mode 100644 index 000000000000..d795b9fd2db6 --- /dev/null +++ b/drivers/macintosh/ans-lcd.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef _PPC_ANS_LCD_H | ||
2 | #define _PPC_ANS_LCD_H | ||
3 | |||
4 | #define ANSLCD_MINOR 156 | ||
5 | |||
6 | #define ANSLCD_CLEAR 0x01 | ||
7 | #define ANSLCD_SENDCTRL 0x02 | ||
8 | #define ANSLCD_SETSHORTDELAY 0x03 | ||
9 | #define ANSLCD_SETLONGDELAY 0x04 | ||
10 | |||
11 | #endif | ||
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index f25685b9b7cf..276945d51513 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
@@ -379,13 +379,10 @@ static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, | |||
379 | if (thermostat) | 379 | if (thermostat) |
380 | return 0; | 380 | return 0; |
381 | 381 | ||
382 | th = (struct thermostat *) | 382 | th = kzalloc(sizeof(struct thermostat), GFP_KERNEL); |
383 | kmalloc(sizeof(struct thermostat), GFP_KERNEL); | ||
384 | |||
385 | if (!th) | 383 | if (!th) |
386 | return -ENOMEM; | 384 | return -ENOMEM; |
387 | 385 | ||
388 | memset(th, 0, sizeof(*th)); | ||
389 | th->clt.addr = addr; | 386 | th->clt.addr = addr; |
390 | th->clt.adapter = adapter; | 387 | th->clt.adapter = adapter; |
391 | th->clt.driver = &thermostat_driver; | 388 | th->clt.driver = &thermostat_driver; |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 04f3973e3874..f7c509b7a8ea 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -410,7 +410,7 @@ static int __init via_pmu_start(void) | |||
410 | 410 | ||
411 | irq = irq_of_parse_and_map(vias, 0); | 411 | irq = irq_of_parse_and_map(vias, 0); |
412 | if (irq == NO_IRQ) { | 412 | if (irq == NO_IRQ) { |
413 | printk(KERN_ERR "via-pmu: can't map interruptn"); | 413 | printk(KERN_ERR "via-pmu: can't map interrupt\n"); |
414 | return -ENODEV; | 414 | return -ENODEV; |
415 | } | 415 | } |
416 | if (request_irq(irq, via_pmu_interrupt, 0, "VIA-PMU", (void *)0)) { | 416 | if (request_irq(irq, via_pmu_interrupt, 0, "VIA-PMU", (void *)0)) { |
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index 351982bcec1b..f449d775cdf4 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c | |||
@@ -380,10 +380,12 @@ static int __init sat_sensors_init(void) | |||
380 | return i2c_add_driver(&wf_sat_driver); | 380 | return i2c_add_driver(&wf_sat_driver); |
381 | } | 381 | } |
382 | 382 | ||
383 | #if 0 /* uncomment when module_exit() below is uncommented */ | ||
383 | static void __exit sat_sensors_exit(void) | 384 | static void __exit sat_sensors_exit(void) |
384 | { | 385 | { |
385 | i2c_del_driver(&wf_sat_driver); | 386 | i2c_del_driver(&wf_sat_driver); |
386 | } | 387 | } |
388 | #endif | ||
387 | 389 | ||
388 | module_init(sat_sensors_init); | 390 | module_init(sat_sensors_init); |
389 | /*module_exit(sat_sensors_exit); Uncomment when cleanup is implemented */ | 391 | /*module_exit(sat_sensors_exit); Uncomment when cleanup is implemented */ |