Commit ca3c2c70 authored by Mattia Dongili's avatar Mattia Dongili Committed by Matthew Garrett

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: default avatarMattia Dongili <malattia@linux.it>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 014fc8fb
...@@ -2642,6 +2642,12 @@ static int sony_nc_add(struct acpi_device *device) ...@@ -2642,6 +2642,12 @@ static int sony_nc_add(struct acpi_device *device)
} }
} }
result = sony_laptop_setup_input(device);
if (result) {
pr_err("Unable to create input devices\n");
goto outplatform;
}
if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "ECON", if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "ECON",
&handle))) { &handle))) {
int arg = 1; int arg = 1;
...@@ -2659,12 +2665,6 @@ static int sony_nc_add(struct acpi_device *device) ...@@ -2659,12 +2665,6 @@ static int sony_nc_add(struct acpi_device *device)
} }
/* setup input devices and helper fifo */ /* setup input devices and helper fifo */
result = sony_laptop_setup_input(device);
if (result) {
pr_err("Unable to create input devices\n");
goto outsnc;
}
if (acpi_video_backlight_support()) { if (acpi_video_backlight_support()) {
pr_info("brightness ignored, must be controlled by ACPI video driver\n"); pr_info("brightness ignored, must be controlled by ACPI video driver\n");
} else { } else {
...@@ -2712,22 +2712,21 @@ static int sony_nc_add(struct acpi_device *device) ...@@ -2712,22 +2712,21 @@ static int sony_nc_add(struct acpi_device *device)
return 0; return 0;
out_sysfs: out_sysfs:
for (item = sony_nc_values; item->name; ++item) { for (item = sony_nc_values; item->name; ++item) {
device_remove_file(&sony_pf_device->dev, &item->devattr); device_remove_file(&sony_pf_device->dev, &item->devattr);
} }
sony_nc_backlight_cleanup(); sony_nc_backlight_cleanup();
sony_laptop_remove_input();
outsnc:
sony_nc_function_cleanup(sony_pf_device); sony_nc_function_cleanup(sony_pf_device);
sony_nc_handles_cleanup(sony_pf_device); sony_nc_handles_cleanup(sony_pf_device);
outpresent: outplatform:
sony_laptop_remove_input();
outpresent:
sony_pf_remove(); sony_pf_remove();
outwalk: outwalk:
sony_nc_rfkill_cleanup(); sony_nc_rfkill_cleanup();
return result; return result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment