diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-08 19:59:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-08 19:59:05 -0400 |
commit | 17dce5dfe38ae2fb359b61e855f5d8a3a8b7892b (patch) | |
tree | 88bb1fcf84f9ebfa4299c9a8dcd9e6330b358446 /drivers/misc | |
parent | 712d6954e3998d0de2840d8130941e8042541246 (diff) | |
parent | 82a28c794f27aac17d7a3ebd7f14d731a11a5532 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
net/mac80211/mlme.c
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/acer-wmi.c | 8 | ||||
-rw-r--r-- | drivers/misc/eeprom_93cx6.c | 1 | ||||
-rw-r--r-- | drivers/misc/fujitsu-laptop.c | 7 | ||||
-rw-r--r-- | drivers/misc/hp-wmi.c | 91 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 1 |
5 files changed, 68 insertions, 40 deletions
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c index b2d9878dc3f0..d8b0d326e452 100644 --- a/drivers/misc/acer-wmi.c +++ b/drivers/misc/acer-wmi.c | |||
@@ -192,6 +192,9 @@ static struct quirk_entry *quirks; | |||
192 | 192 | ||
193 | static void set_quirks(void) | 193 | static void set_quirks(void) |
194 | { | 194 | { |
195 | if (!interface) | ||
196 | return; | ||
197 | |||
195 | if (quirks->mailled) | 198 | if (quirks->mailled) |
196 | interface->capability |= ACER_CAP_MAILLED; | 199 | interface->capability |= ACER_CAP_MAILLED; |
197 | 200 | ||
@@ -1186,7 +1189,7 @@ static int create_debugfs(void) | |||
1186 | return 0; | 1189 | return 0; |
1187 | 1190 | ||
1188 | error_debugfs: | 1191 | error_debugfs: |
1189 | remove_debugfs(); | 1192 | remove_debugfs(); |
1190 | return -ENOMEM; | 1193 | return -ENOMEM; |
1191 | } | 1194 | } |
1192 | 1195 | ||
@@ -1237,6 +1240,8 @@ static int __init acer_wmi_init(void) | |||
1237 | return -ENODEV; | 1240 | return -ENODEV; |
1238 | } | 1241 | } |
1239 | 1242 | ||
1243 | set_quirks(); | ||
1244 | |||
1240 | if (platform_driver_register(&acer_platform_driver)) { | 1245 | if (platform_driver_register(&acer_platform_driver)) { |
1241 | printk(ACER_ERR "Unable to register platform driver.\n"); | 1246 | printk(ACER_ERR "Unable to register platform driver.\n"); |
1242 | goto error_platform_register; | 1247 | goto error_platform_register; |
@@ -1267,6 +1272,7 @@ error_platform_register: | |||
1267 | static void __exit acer_wmi_exit(void) | 1272 | static void __exit acer_wmi_exit(void) |
1268 | { | 1273 | { |
1269 | remove_sysfs(acer_platform_device); | 1274 | remove_sysfs(acer_platform_device); |
1275 | remove_debugfs(); | ||
1270 | platform_device_del(acer_platform_device); | 1276 | platform_device_del(acer_platform_device); |
1271 | platform_driver_unregister(&acer_platform_driver); | 1277 | platform_driver_unregister(&acer_platform_driver); |
1272 | 1278 | ||
diff --git a/drivers/misc/eeprom_93cx6.c b/drivers/misc/eeprom_93cx6.c index ea55654e5948..15b1780025c8 100644 --- a/drivers/misc/eeprom_93cx6.c +++ b/drivers/misc/eeprom_93cx6.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/version.h> | ||
30 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
31 | #include <linux/eeprom_93cx6.h> | 30 | #include <linux/eeprom_93cx6.h> |
32 | 31 | ||
diff --git a/drivers/misc/fujitsu-laptop.c b/drivers/misc/fujitsu-laptop.c index 7a1ef6c262de..3e56203e4947 100644 --- a/drivers/misc/fujitsu-laptop.c +++ b/drivers/misc/fujitsu-laptop.c | |||
@@ -463,6 +463,13 @@ static struct dmi_system_id __initdata fujitsu_dmi_table[] = { | |||
463 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S6410"), | 463 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S6410"), |
464 | }, | 464 | }, |
465 | .callback = dmi_check_cb_s6410}, | 465 | .callback = dmi_check_cb_s6410}, |
466 | { | ||
467 | .ident = "FUJITSU LifeBook P8010", | ||
468 | .matches = { | ||
469 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | ||
470 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook P8010"), | ||
471 | }, | ||
472 | .callback = dmi_check_cb_s6410}, | ||
466 | {} | 473 | {} |
467 | }; | 474 | }; |
468 | 475 | ||
diff --git a/drivers/misc/hp-wmi.c b/drivers/misc/hp-wmi.c index 1dbcbcb323a2..6d407c2a4f91 100644 --- a/drivers/misc/hp-wmi.c +++ b/drivers/misc/hp-wmi.c | |||
@@ -49,6 +49,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4"); | |||
49 | #define HPWMI_ALS_QUERY 0x3 | 49 | #define HPWMI_ALS_QUERY 0x3 |
50 | #define HPWMI_DOCK_QUERY 0x4 | 50 | #define HPWMI_DOCK_QUERY 0x4 |
51 | #define HPWMI_WIRELESS_QUERY 0x5 | 51 | #define HPWMI_WIRELESS_QUERY 0x5 |
52 | #define HPWMI_HOTKEY_QUERY 0xc | ||
52 | 53 | ||
53 | static int __init hp_wmi_bios_setup(struct platform_device *device); | 54 | static int __init hp_wmi_bios_setup(struct platform_device *device); |
54 | static int __exit hp_wmi_bios_remove(struct platform_device *device); | 55 | static int __exit hp_wmi_bios_remove(struct platform_device *device); |
@@ -69,7 +70,7 @@ struct bios_return { | |||
69 | 70 | ||
70 | struct key_entry { | 71 | struct key_entry { |
71 | char type; /* See KE_* below */ | 72 | char type; /* See KE_* below */ |
72 | u8 code; | 73 | u16 code; |
73 | u16 keycode; | 74 | u16 keycode; |
74 | }; | 75 | }; |
75 | 76 | ||
@@ -79,7 +80,9 @@ static struct key_entry hp_wmi_keymap[] = { | |||
79 | {KE_SW, 0x01, SW_DOCK}, | 80 | {KE_SW, 0x01, SW_DOCK}, |
80 | {KE_KEY, 0x02, KEY_BRIGHTNESSUP}, | 81 | {KE_KEY, 0x02, KEY_BRIGHTNESSUP}, |
81 | {KE_KEY, 0x03, KEY_BRIGHTNESSDOWN}, | 82 | {KE_KEY, 0x03, KEY_BRIGHTNESSDOWN}, |
82 | {KE_KEY, 0x04, KEY_HELP}, | 83 | {KE_KEY, 0x20e6, KEY_PROG1}, |
84 | {KE_KEY, 0x2142, KEY_MEDIA}, | ||
85 | {KE_KEY, 0x231b, KEY_HELP}, | ||
83 | {KE_END, 0} | 86 | {KE_END, 0} |
84 | }; | 87 | }; |
85 | 88 | ||
@@ -177,9 +180,9 @@ static int hp_wmi_wifi_state(void) | |||
177 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); | 180 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); |
178 | 181 | ||
179 | if (wireless & 0x100) | 182 | if (wireless & 0x100) |
180 | return 1; | 183 | return RFKILL_STATE_UNBLOCKED; |
181 | else | 184 | else |
182 | return 0; | 185 | return RFKILL_STATE_SOFT_BLOCKED; |
183 | } | 186 | } |
184 | 187 | ||
185 | static int hp_wmi_bluetooth_state(void) | 188 | static int hp_wmi_bluetooth_state(void) |
@@ -187,9 +190,9 @@ static int hp_wmi_bluetooth_state(void) | |||
187 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); | 190 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); |
188 | 191 | ||
189 | if (wireless & 0x10000) | 192 | if (wireless & 0x10000) |
190 | return 1; | 193 | return RFKILL_STATE_UNBLOCKED; |
191 | else | 194 | else |
192 | return 0; | 195 | return RFKILL_STATE_SOFT_BLOCKED; |
193 | } | 196 | } |
194 | 197 | ||
195 | static int hp_wmi_wwan_state(void) | 198 | static int hp_wmi_wwan_state(void) |
@@ -197,9 +200,9 @@ static int hp_wmi_wwan_state(void) | |||
197 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); | 200 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); |
198 | 201 | ||
199 | if (wireless & 0x1000000) | 202 | if (wireless & 0x1000000) |
200 | return 1; | 203 | return RFKILL_STATE_UNBLOCKED; |
201 | else | 204 | else |
202 | return 0; | 205 | return RFKILL_STATE_SOFT_BLOCKED; |
203 | } | 206 | } |
204 | 207 | ||
205 | static ssize_t show_display(struct device *dev, struct device_attribute *attr, | 208 | static ssize_t show_display(struct device *dev, struct device_attribute *attr, |
@@ -318,6 +321,9 @@ void hp_wmi_notify(u32 value, void *context) | |||
318 | 321 | ||
319 | if (obj && obj->type == ACPI_TYPE_BUFFER && obj->buffer.length == 8) { | 322 | if (obj && obj->type == ACPI_TYPE_BUFFER && obj->buffer.length == 8) { |
320 | int eventcode = *((u8 *) obj->buffer.pointer); | 323 | int eventcode = *((u8 *) obj->buffer.pointer); |
324 | if (eventcode == 0x4) | ||
325 | eventcode = hp_wmi_perform_query(HPWMI_HOTKEY_QUERY, 0, | ||
326 | 0); | ||
321 | key = hp_wmi_get_entry_by_scancode(eventcode); | 327 | key = hp_wmi_get_entry_by_scancode(eventcode); |
322 | if (key) { | 328 | if (key) { |
323 | switch (key->type) { | 329 | switch (key->type) { |
@@ -338,12 +344,14 @@ void hp_wmi_notify(u32 value, void *context) | |||
338 | } | 344 | } |
339 | } else if (eventcode == 0x5) { | 345 | } else if (eventcode == 0x5) { |
340 | if (wifi_rfkill) | 346 | if (wifi_rfkill) |
341 | wifi_rfkill->state = hp_wmi_wifi_state(); | 347 | rfkill_force_state(wifi_rfkill, |
348 | hp_wmi_wifi_state()); | ||
342 | if (bluetooth_rfkill) | 349 | if (bluetooth_rfkill) |
343 | bluetooth_rfkill->state = | 350 | rfkill_force_state(bluetooth_rfkill, |
344 | hp_wmi_bluetooth_state(); | 351 | hp_wmi_bluetooth_state()); |
345 | if (wwan_rfkill) | 352 | if (wwan_rfkill) |
346 | wwan_rfkill->state = hp_wmi_wwan_state(); | 353 | rfkill_force_state(wwan_rfkill, |
354 | hp_wmi_wwan_state()); | ||
347 | } else | 355 | } else |
348 | printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n", | 356 | printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n", |
349 | eventcode); | 357 | eventcode); |
@@ -398,6 +406,7 @@ static void cleanup_sysfs(struct platform_device *device) | |||
398 | static int __init hp_wmi_bios_setup(struct platform_device *device) | 406 | static int __init hp_wmi_bios_setup(struct platform_device *device) |
399 | { | 407 | { |
400 | int err; | 408 | int err; |
409 | int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0); | ||
401 | 410 | ||
402 | err = device_create_file(&device->dev, &dev_attr_display); | 411 | err = device_create_file(&device->dev, &dev_attr_display); |
403 | if (err) | 412 | if (err) |
@@ -412,28 +421,33 @@ static int __init hp_wmi_bios_setup(struct platform_device *device) | |||
412 | if (err) | 421 | if (err) |
413 | goto add_sysfs_error; | 422 | goto add_sysfs_error; |
414 | 423 | ||
415 | wifi_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WLAN); | 424 | if (wireless & 0x1) { |
416 | wifi_rfkill->name = "hp-wifi"; | 425 | wifi_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WLAN); |
417 | wifi_rfkill->state = hp_wmi_wifi_state(); | 426 | wifi_rfkill->name = "hp-wifi"; |
418 | wifi_rfkill->toggle_radio = hp_wmi_wifi_set; | 427 | wifi_rfkill->state = hp_wmi_wifi_state(); |
419 | wifi_rfkill->user_claim_unsupported = 1; | 428 | wifi_rfkill->toggle_radio = hp_wmi_wifi_set; |
420 | 429 | wifi_rfkill->user_claim_unsupported = 1; | |
421 | bluetooth_rfkill = rfkill_allocate(&device->dev, | 430 | rfkill_register(wifi_rfkill); |
422 | RFKILL_TYPE_BLUETOOTH); | 431 | } |
423 | bluetooth_rfkill->name = "hp-bluetooth"; | 432 | |
424 | bluetooth_rfkill->state = hp_wmi_bluetooth_state(); | 433 | if (wireless & 0x2) { |
425 | bluetooth_rfkill->toggle_radio = hp_wmi_bluetooth_set; | 434 | bluetooth_rfkill = rfkill_allocate(&device->dev, |
426 | bluetooth_rfkill->user_claim_unsupported = 1; | 435 | RFKILL_TYPE_BLUETOOTH); |
427 | 436 | bluetooth_rfkill->name = "hp-bluetooth"; | |
428 | wwan_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WIMAX); | 437 | bluetooth_rfkill->state = hp_wmi_bluetooth_state(); |
429 | wwan_rfkill->name = "hp-wwan"; | 438 | bluetooth_rfkill->toggle_radio = hp_wmi_bluetooth_set; |
430 | wwan_rfkill->state = hp_wmi_wwan_state(); | 439 | bluetooth_rfkill->user_claim_unsupported = 1; |
431 | wwan_rfkill->toggle_radio = hp_wmi_wwan_set; | 440 | rfkill_register(bluetooth_rfkill); |
432 | wwan_rfkill->user_claim_unsupported = 1; | 441 | } |
433 | 442 | ||
434 | rfkill_register(wifi_rfkill); | 443 | if (wireless & 0x4) { |
435 | rfkill_register(bluetooth_rfkill); | 444 | wwan_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WWAN); |
436 | rfkill_register(wwan_rfkill); | 445 | wwan_rfkill->name = "hp-wwan"; |
446 | wwan_rfkill->state = hp_wmi_wwan_state(); | ||
447 | wwan_rfkill->toggle_radio = hp_wmi_wwan_set; | ||
448 | wwan_rfkill->user_claim_unsupported = 1; | ||
449 | rfkill_register(wwan_rfkill); | ||
450 | } | ||
437 | 451 | ||
438 | return 0; | 452 | return 0; |
439 | add_sysfs_error: | 453 | add_sysfs_error: |
@@ -445,9 +459,12 @@ static int __exit hp_wmi_bios_remove(struct platform_device *device) | |||
445 | { | 459 | { |
446 | cleanup_sysfs(device); | 460 | cleanup_sysfs(device); |
447 | 461 | ||
448 | rfkill_unregister(wifi_rfkill); | 462 | if (wifi_rfkill) |
449 | rfkill_unregister(bluetooth_rfkill); | 463 | rfkill_unregister(wifi_rfkill); |
450 | rfkill_unregister(wwan_rfkill); | 464 | if (bluetooth_rfkill) |
465 | rfkill_unregister(bluetooth_rfkill); | ||
466 | if (wwan_rfkill) | ||
467 | rfkill_unregister(wwan_rfkill); | ||
451 | 468 | ||
452 | return 0; | 469 | return 0; |
453 | } | 470 | } |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index d3eb7903c346..6b9300779a43 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -3086,7 +3086,6 @@ static struct ibm_struct wan_driver_data = { | |||
3086 | .read = wan_read, | 3086 | .read = wan_read, |
3087 | .write = wan_write, | 3087 | .write = wan_write, |
3088 | .exit = wan_exit, | 3088 | .exit = wan_exit, |
3089 | .flags.experimental = 1, | ||
3090 | }; | 3089 | }; |
3091 | 3090 | ||
3092 | /************************************************************************* | 3091 | /************************************************************************* |