diff options
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) | |||
382 | case KE_SW: | 382 | case KE_SW: |
383 | set_bit(EV_SW, hp_wmi_input_dev->evbit); | 383 | set_bit(EV_SW, hp_wmi_input_dev->evbit); |
384 | set_bit(key->keycode, hp_wmi_input_dev->swbit); | 384 | set_bit(key->keycode, hp_wmi_input_dev->swbit); |
385 | |||
386 | /* Set initial dock state */ | ||
387 | input_report_switch(hp_wmi_input_dev, key->keycode, | ||
388 | hp_wmi_dock_state()); | ||
389 | input_sync(hp_wmi_input_dev); | ||
385 | break; | 390 | break; |
386 | } | 391 | } |
387 | } | 392 | } |
@@ -441,6 +446,7 @@ static int __init hp_wmi_bios_setup(struct platform_device *device) | |||
441 | bluetooth_rfkill->toggle_radio = hp_wmi_bluetooth_set; | 446 | bluetooth_rfkill->toggle_radio = hp_wmi_bluetooth_set; |
442 | bluetooth_rfkill->user_claim_unsupported = 1; | 447 | bluetooth_rfkill->user_claim_unsupported = 1; |
443 | err = rfkill_register(bluetooth_rfkill); | 448 | err = rfkill_register(bluetooth_rfkill); |
449 | if (err) | ||
444 | goto register_bluetooth_error; | 450 | goto register_bluetooth_error; |
445 | } | 451 | } |
446 | 452 | ||
@@ -457,9 +463,11 @@ static int __init hp_wmi_bios_setup(struct platform_device *device) | |||
457 | 463 | ||
458 | return 0; | 464 | return 0; |
459 | register_wwan_err: | 465 | register_wwan_err: |
460 | rfkill_unregister(bluetooth_rfkill); | 466 | if (bluetooth_rfkill) |
467 | rfkill_unregister(bluetooth_rfkill); | ||
461 | register_bluetooth_error: | 468 | register_bluetooth_error: |
462 | rfkill_unregister(wifi_rfkill); | 469 | if (wifi_rfkill) |
470 | rfkill_unregister(wifi_rfkill); | ||
463 | add_sysfs_error: | 471 | add_sysfs_error: |
464 | cleanup_sysfs(device); | 472 | cleanup_sysfs(device); |
465 | return err; | 473 | return err; |