diff options
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 9d93cb971e59..66d611b225f8 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -737,13 +737,21 @@ static void eeepc_backlight_exit(void) | |||
737 | { | 737 | { |
738 | if (eeepc_backlight_device) | 738 | if (eeepc_backlight_device) |
739 | backlight_device_unregister(eeepc_backlight_device); | 739 | backlight_device_unregister(eeepc_backlight_device); |
740 | if (ehotk->inputdev) | 740 | eeepc_backlight_device = NULL; |
741 | input_unregister_device(ehotk->inputdev); | 741 | } |
742 | |||
743 | static void eeepc_rfkill_exit(void) | ||
744 | { | ||
742 | if (ehotk->eeepc_wlan_rfkill) | 745 | if (ehotk->eeepc_wlan_rfkill) |
743 | rfkill_unregister(ehotk->eeepc_wlan_rfkill); | 746 | rfkill_unregister(ehotk->eeepc_wlan_rfkill); |
744 | if (ehotk->eeepc_bluetooth_rfkill) | 747 | if (ehotk->eeepc_bluetooth_rfkill) |
745 | rfkill_unregister(ehotk->eeepc_bluetooth_rfkill); | 748 | rfkill_unregister(ehotk->eeepc_bluetooth_rfkill); |
746 | eeepc_backlight_device = NULL; | 749 | } |
750 | |||
751 | static void eeepc_input_exit(void) | ||
752 | { | ||
753 | if (ehotk->inputdev) | ||
754 | input_unregister_device(ehotk->inputdev); | ||
747 | } | 755 | } |
748 | 756 | ||
749 | static void eeepc_hwmon_exit(void) | 757 | static void eeepc_hwmon_exit(void) |
@@ -762,6 +770,8 @@ static void eeepc_hwmon_exit(void) | |||
762 | static void __exit eeepc_laptop_exit(void) | 770 | static void __exit eeepc_laptop_exit(void) |
763 | { | 771 | { |
764 | eeepc_backlight_exit(); | 772 | eeepc_backlight_exit(); |
773 | eeepc_rfkill_exit(); | ||
774 | eeepc_input_exit(); | ||
765 | eeepc_hwmon_exit(); | 775 | eeepc_hwmon_exit(); |
766 | acpi_bus_unregister_driver(&eeepc_hotk_driver); | 776 | acpi_bus_unregister_driver(&eeepc_hotk_driver); |
767 | sysfs_remove_group(&platform_device->dev.kobj, | 777 | sysfs_remove_group(&platform_device->dev.kobj, |
@@ -865,6 +875,8 @@ fail_platform_driver: | |||
865 | fail_hwmon: | 875 | fail_hwmon: |
866 | eeepc_backlight_exit(); | 876 | eeepc_backlight_exit(); |
867 | fail_backlight: | 877 | fail_backlight: |
878 | eeepc_input_exit(); | ||
879 | eeepc_rfkill_exit(); | ||
868 | return result; | 880 | return result; |
869 | } | 881 | } |
870 | 882 | ||