diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/acer-wmi.c | 24 | ||||
-rw-r--r-- | drivers/misc/eeepc-laptop.c | 2 | ||||
-rw-r--r-- | drivers/misc/eeprom_93cx6.c | 1 |
3 files changed, 25 insertions, 2 deletions
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c index e7a3fe508dff..c6c77a505ec1 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 | ||
@@ -803,11 +806,30 @@ static acpi_status get_u32(u32 *value, u32 cap) | |||
803 | 806 | ||
804 | static acpi_status set_u32(u32 value, u32 cap) | 807 | static acpi_status set_u32(u32 value, u32 cap) |
805 | { | 808 | { |
809 | acpi_status status; | ||
810 | |||
806 | if (interface->capability & cap) { | 811 | if (interface->capability & cap) { |
807 | switch (interface->type) { | 812 | switch (interface->type) { |
808 | case ACER_AMW0: | 813 | case ACER_AMW0: |
809 | return AMW0_set_u32(value, cap, interface); | 814 | return AMW0_set_u32(value, cap, interface); |
810 | case ACER_AMW0_V2: | 815 | case ACER_AMW0_V2: |
816 | if (cap == ACER_CAP_MAILLED) | ||
817 | return AMW0_set_u32(value, cap, interface); | ||
818 | |||
819 | /* | ||
820 | * On some models, some WMID methods don't toggle | ||
821 | * properly. For those cases, we want to run the AMW0 | ||
822 | * method afterwards to be certain we've really toggled | ||
823 | * the device state. | ||
824 | */ | ||
825 | if (cap == ACER_CAP_WIRELESS || | ||
826 | cap == ACER_CAP_BLUETOOTH) { | ||
827 | status = WMID_set_u32(value, cap, interface); | ||
828 | if (ACPI_FAILURE(status)) | ||
829 | return status; | ||
830 | |||
831 | return AMW0_set_u32(value, cap, interface); | ||
832 | } | ||
811 | case ACER_WMID: | 833 | case ACER_WMID: |
812 | return WMID_set_u32(value, cap, interface); | 834 | return WMID_set_u32(value, cap, interface); |
813 | default: | 835 | default: |
@@ -1218,6 +1240,8 @@ static int __init acer_wmi_init(void) | |||
1218 | return -ENODEV; | 1240 | return -ENODEV; |
1219 | } | 1241 | } |
1220 | 1242 | ||
1243 | set_quirks(); | ||
1244 | |||
1221 | if (platform_driver_register(&acer_platform_driver)) { | 1245 | if (platform_driver_register(&acer_platform_driver)) { |
1222 | printk(ACER_ERR "Unable to register platform driver.\n"); | 1246 | printk(ACER_ERR "Unable to register platform driver.\n"); |
1223 | goto error_platform_register; | 1247 | goto error_platform_register; |
diff --git a/drivers/misc/eeepc-laptop.c b/drivers/misc/eeepc-laptop.c index 9e8d79e7e9f4..facdb9893c84 100644 --- a/drivers/misc/eeepc-laptop.c +++ b/drivers/misc/eeepc-laptop.c | |||
@@ -553,9 +553,9 @@ static void eeepc_hwmon_exit(void) | |||
553 | hwmon = eeepc_hwmon_device; | 553 | hwmon = eeepc_hwmon_device; |
554 | if (!hwmon) | 554 | if (!hwmon) |
555 | return ; | 555 | return ; |
556 | hwmon_device_unregister(hwmon); | ||
557 | sysfs_remove_group(&hwmon->kobj, | 556 | sysfs_remove_group(&hwmon->kobj, |
558 | &hwmon_attribute_group); | 557 | &hwmon_attribute_group); |
558 | hwmon_device_unregister(hwmon); | ||
559 | eeepc_hwmon_device = NULL; | 559 | eeepc_hwmon_device = NULL; |
560 | } | 560 | } |
561 | 561 | ||
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 | ||