aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>2009-12-03 07:44:57 +0000
committerLen Brown <len.brown@intel.com>2009-12-09 15:54:31 -0500
commit2b56f1c170fc6338a7d907d6a7132669f9ccdf62 (patch)
tree0df570ed8f7ea47f05d39338b8c7b17b2f69049d /drivers/platform
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')
-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 6c982d6c3a5..ac45fafbb79 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)
static void eeepc_led_exit(void)
{
- if (led_workqueue)
- destroy_workqueue(led_workqueue);
if (tpd_led.dev)
led_classdev_unregister(&tpd_led);
+ if (led_workqueue)
+ destroy_workqueue(led_workqueue);
}
static int eeepc_new_rfkill(struct rfkill **rfkill,
@@ -1243,14 +1243,14 @@ static int eeepc_led_init(struct device *dev)
if (get_acpi(CM_ASL_TPD) == -ENODEV)
return 0;
- rv = led_classdev_register(dev, &tpd_led);
- if (rv)
- return rv;
-
led_workqueue = create_singlethread_workqueue("led_workqueue");
if (!led_workqueue)
return -ENOMEM;
+ rv = led_classdev_register(dev, &tpd_led);
+ if (rv)
+ return rv;
+
return 0;
}