diff options
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 3 | ||||
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 12 | ||||
-rw-r--r-- | drivers/platform/x86/panasonic-laptop.c | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 4348d9909bb2..786ed8661cb0 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -515,7 +515,8 @@ static int eeepc_hotk_check(void) | |||
515 | static void notify_brn(void) | 515 | static void notify_brn(void) |
516 | { | 516 | { |
517 | struct backlight_device *bd = eeepc_backlight_device; | 517 | struct backlight_device *bd = eeepc_backlight_device; |
518 | bd->props.brightness = read_brightness(bd); | 518 | if (bd) |
519 | bd->props.brightness = read_brightness(bd); | ||
519 | } | 520 | } |
520 | 521 | ||
521 | static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) | 522 | static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) |
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; |
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index f30db367c82e..c47a44dcb702 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c | |||
@@ -507,7 +507,7 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc) | |||
507 | 507 | ||
508 | hkey_num = result & 0xf; | 508 | hkey_num = result & 0xf; |
509 | 509 | ||
510 | if (hkey_num < 0 || hkey_num > ARRAY_SIZE(pcc->keymap)) { | 510 | if (hkey_num < 0 || hkey_num >= ARRAY_SIZE(pcc->keymap)) { |
511 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 511 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
512 | "hotkey number out of range: %d\n", | 512 | "hotkey number out of range: %d\n", |
513 | hkey_num)); | 513 | hkey_num)); |