diff options
| author | Eric Miao <eric.miao@marvell.com> | 2009-03-09 21:21:07 +0800 |
|---|---|---|
| committer | Eric Miao <eric.miao@marvell.com> | 2009-03-09 21:21:07 +0800 |
| commit | abcea2c322cef559ef2f108b4763d107a5ccc37f (patch) | |
| tree | 5fec7fec372f9bdb70703f6c77bfc49cda945442 /drivers/platform/x86/hp-wmi.c | |
| parent | 8118aea23c328fd4913b325af53fda9d530b1d56 (diff) | |
| parent | 6d831c6554e4f95083919914955a1a3a4a6acfa9 (diff) | |
Merge branch 'devel' of ssh://master.kernel.org/home/rmk/linux-2.6-arm into devel
Diffstat (limited to 'drivers/platform/x86/hp-wmi.c')
| -rw-r--r-- | drivers/platform/x86/hp-wmi.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 7c789f0a94d7..f41135f2fb29 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c @@ -382,6 +382,11 @@ static int __init hp_wmi_input_setup(void) case KE_SW: set_bit(EV_SW, hp_wmi_input_dev->evbit); set_bit(key->keycode, hp_wmi_input_dev->swbit); + + /* Set initial dock state */ + input_report_switch(hp_wmi_input_dev, key->keycode, + hp_wmi_dock_state()); + input_sync(hp_wmi_input_dev); break; } } @@ -441,6 +446,7 @@ static int __init hp_wmi_bios_setup(struct platform_device *device) bluetooth_rfkill->toggle_radio = hp_wmi_bluetooth_set; bluetooth_rfkill->user_claim_unsupported = 1; err = rfkill_register(bluetooth_rfkill); + if (err) goto register_bluetooth_error; } @@ -457,9 +463,11 @@ static int __init hp_wmi_bios_setup(struct platform_device *device) return 0; register_wwan_err: - rfkill_unregister(bluetooth_rfkill); + if (bluetooth_rfkill) + rfkill_unregister(bluetooth_rfkill); register_bluetooth_error: - rfkill_unregister(wifi_rfkill); + if (wifi_rfkill) + rfkill_unregister(wifi_rfkill); add_sysfs_error: cleanup_sysfs(device); return err; |
