aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/eeepc-laptop.c
diff options
context:
space:
mode:
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>2009-12-03 02:44:57 -0500
committerLen Brown <len.brown@intel.com>2009-12-09 15:54:31 -0500
commit2b56f1c170fc6338a7d907d6a7132669f9ccdf62 (patch)
tree0df570ed8f7ea47f05d39338b8c7b17b2f69049d /drivers/platform/x86/eeepc-laptop.c
parent487186880d31821eaaba0cc1f27d5a581c56981d (diff)
eeepc-laptop: fix led initialization order
Create the workqueue thread used by tpd_led_set() *before* we register the led device. (And vice versa for unregistration). Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform/x86/eeepc-laptop.c')
-rw-r--r--drivers/platform/x86/eeepc-laptop.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 6c982d6c3a54..ac45fafbb796 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -1074,10 +1074,10 @@ static void eeepc_hwmon_exit(void)
1074 1074
1075static void eeepc_led_exit(void) 1075static void eeepc_led_exit(void)
1076{ 1076{
1077 if (led_workqueue)
1078 destroy_workqueue(led_workqueue);
1079 if (tpd_led.dev) 1077 if (tpd_led.dev)
1080 led_classdev_unregister(&tpd_led); 1078 led_classdev_unregister(&tpd_led);
1079 if (led_workqueue)
1080 destroy_workqueue(led_workqueue);
1081} 1081}
1082 1082
1083static int eeepc_new_rfkill(struct rfkill **rfkill, 1083static int eeepc_new_rfkill(struct rfkill **rfkill,
@@ -1243,14 +1243,14 @@ static int eeepc_led_init(struct device *dev)
1243 if (get_acpi(CM_ASL_TPD) == -ENODEV) 1243 if (get_acpi(CM_ASL_TPD) == -ENODEV)
1244 return 0; 1244 return 0;
1245 1245
1246 rv = led_classdev_register(dev, &tpd_led);
1247 if (rv)
1248 return rv;
1249
1250 led_workqueue = create_singlethread_workqueue("led_workqueue"); 1246 led_workqueue = create_singlethread_workqueue("led_workqueue");
1251 if (!led_workqueue) 1247 if (!led_workqueue)
1252 return -ENOMEM; 1248 return -ENOMEM;
1253 1249
1250 rv = led_classdev_register(dev, &tpd_led);
1251 if (rv)
1252 return rv;
1253
1254 return 0; 1254 return 0;
1255} 1255}
1256 1256