diff options
author | Mattia Dongili <malattia@linux.it> | 2012-06-09 00:18:12 -0400 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2012-06-26 14:43:21 -0400 |
commit | ca3c2c706de39b3400e57254dce054bf7350efa2 (patch) | |
tree | 229626f22d8fd6f4e26e68533c48b9f62560b119 /drivers/platform | |
parent | 014fc8fbece33d42e2aa92d289fffa213a159321 (diff) |
sony-laptop: input initialization should be done before SNC
SNC needs input devices so better have those ready before starting
handle events.
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index a94e13fe1f42..89ff6d845f34 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -2642,6 +2642,12 @@ static int sony_nc_add(struct acpi_device *device) | |||
2642 | } | 2642 | } |
2643 | } | 2643 | } |
2644 | 2644 | ||
2645 | result = sony_laptop_setup_input(device); | ||
2646 | if (result) { | ||
2647 | pr_err("Unable to create input devices\n"); | ||
2648 | goto outplatform; | ||
2649 | } | ||
2650 | |||
2645 | if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "ECON", | 2651 | if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "ECON", |
2646 | &handle))) { | 2652 | &handle))) { |
2647 | int arg = 1; | 2653 | int arg = 1; |
@@ -2659,12 +2665,6 @@ static int sony_nc_add(struct acpi_device *device) | |||
2659 | } | 2665 | } |
2660 | 2666 | ||
2661 | /* setup input devices and helper fifo */ | 2667 | /* setup input devices and helper fifo */ |
2662 | result = sony_laptop_setup_input(device); | ||
2663 | if (result) { | ||
2664 | pr_err("Unable to create input devices\n"); | ||
2665 | goto outsnc; | ||
2666 | } | ||
2667 | |||
2668 | if (acpi_video_backlight_support()) { | 2668 | if (acpi_video_backlight_support()) { |
2669 | pr_info("brightness ignored, must be controlled by ACPI video driver\n"); | 2669 | pr_info("brightness ignored, must be controlled by ACPI video driver\n"); |
2670 | } else { | 2670 | } else { |
@@ -2712,22 +2712,21 @@ static int sony_nc_add(struct acpi_device *device) | |||
2712 | 2712 | ||
2713 | return 0; | 2713 | return 0; |
2714 | 2714 | ||
2715 | out_sysfs: | 2715 | out_sysfs: |
2716 | for (item = sony_nc_values; item->name; ++item) { | 2716 | for (item = sony_nc_values; item->name; ++item) { |
2717 | device_remove_file(&sony_pf_device->dev, &item->devattr); | 2717 | device_remove_file(&sony_pf_device->dev, &item->devattr); |
2718 | } | 2718 | } |
2719 | sony_nc_backlight_cleanup(); | 2719 | sony_nc_backlight_cleanup(); |
2720 | |||
2721 | sony_laptop_remove_input(); | ||
2722 | |||
2723 | outsnc: | ||
2724 | sony_nc_function_cleanup(sony_pf_device); | 2720 | sony_nc_function_cleanup(sony_pf_device); |
2725 | sony_nc_handles_cleanup(sony_pf_device); | 2721 | sony_nc_handles_cleanup(sony_pf_device); |
2726 | 2722 | ||
2727 | outpresent: | 2723 | outplatform: |
2724 | sony_laptop_remove_input(); | ||
2725 | |||
2726 | outpresent: | ||
2728 | sony_pf_remove(); | 2727 | sony_pf_remove(); |
2729 | 2728 | ||
2730 | outwalk: | 2729 | outwalk: |
2731 | sony_nc_rfkill_cleanup(); | 2730 | sony_nc_rfkill_cleanup(); |
2732 | return result; | 2731 | return result; |
2733 | } | 2732 | } |