aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/eeepc-laptop.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-03 10:41:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-03 10:41:24 -0500
commitb037bba71bca77c7247e7c2079f227ad7b961c34 (patch)
tree459896135ace66b9e690067e573e5da25b1df24d /drivers/platform/x86/eeepc-laptop.c
parenta03696e912cd544e1504a79e49600cdb535f42db (diff)
parent51c1410bd651609aafbcc3a2294df26a47bf6137 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (45 commits) compal-laptop: Make it depend on CONFIG_RFKILL classmate-laptop: Added some keys present in other devices MAINTAINERS: Add git tree to x86 Platform Drivers asus-acpi: remove duplicate comparison of asus_model strings toshiba-acpi: fix multimedia keys on some machines dell-laptop: Fix errors on failure and exit paths dell-laptop: Fix build error by making buffer_mutex static asus-laptop: fix style problems reported by checkpath.pl asus-laptop: use device_create_file() instead of platform_group asus-laptop: clean led code asus-laptop: add gps rfkill asus-laptop: set initial lcd state asus-laptop: leds, remove dead code and fix asus_led_exit()/asus_led_init() asus-laptop: add backlight changes notifications asus-laptop: add bluetooth keys found on M9V asus-laptop: switch to sparse keymap library asus-laptop: rename wireless_status to wlan_status to avoid confusion asus-laptop: add error check for write_acpi_int calls asus-laptop: stop using ASUS_HANDLE and use relative methods instead asus-laptop: rename function talking directly to acpi with asus_xxx scheme ...
Diffstat (limited to 'drivers/platform/x86/eeepc-laptop.c')
-rw-r--r--drivers/platform/x86/eeepc-laptop.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index e2be6bb33d9..9a844caa375 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -578,6 +578,8 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc)
578 struct pci_dev *dev; 578 struct pci_dev *dev;
579 struct pci_bus *bus; 579 struct pci_bus *bus;
580 bool blocked = eeepc_wlan_rfkill_blocked(eeepc); 580 bool blocked = eeepc_wlan_rfkill_blocked(eeepc);
581 bool absent;
582 u32 l;
581 583
582 if (eeepc->wlan_rfkill) 584 if (eeepc->wlan_rfkill)
583 rfkill_set_sw_state(eeepc->wlan_rfkill, blocked); 585 rfkill_set_sw_state(eeepc->wlan_rfkill, blocked);
@@ -591,6 +593,22 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc)
591 goto out_unlock; 593 goto out_unlock;
592 } 594 }
593 595
596 if (pci_bus_read_config_dword(bus, 0, PCI_VENDOR_ID, &l)) {
597 pr_err("Unable to read PCI config space?\n");
598 goto out_unlock;
599 }
600 absent = (l == 0xffffffff);
601
602 if (blocked != absent) {
603 pr_warning("BIOS says wireless lan is %s, "
604 "but the pci device is %s\n",
605 blocked ? "blocked" : "unblocked",
606 absent ? "absent" : "present");
607 pr_warning("skipped wireless hotplug as probably "
608 "inappropriate for this model\n");
609 goto out_unlock;
610 }
611
594 if (!blocked) { 612 if (!blocked) {
595 dev = pci_get_slot(bus, 0); 613 dev = pci_get_slot(bus, 0);
596 if (dev) { 614 if (dev) {
@@ -1277,7 +1295,8 @@ static void eeepc_dmi_check(struct eeepc_laptop *eeepc)
1277 * hotplug code. In fact, current hotplug code seems to unplug another 1295 * hotplug code. In fact, current hotplug code seems to unplug another
1278 * device... 1296 * device...
1279 */ 1297 */
1280 if (strcmp(model, "1005HA") == 0 || strcmp(model, "1201N") == 0) { 1298 if (strcmp(model, "1005HA") == 0 || strcmp(model, "1201N") == 0 ||
1299 strcmp(model, "1005PE") == 0) {
1281 eeepc->hotplug_disabled = true; 1300 eeepc->hotplug_disabled = true;
1282 pr_info("wlan hotplug disabled\n"); 1301 pr_info("wlan hotplug disabled\n");
1283 } 1302 }