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>
This commit is contained in:
Mattia Dongili 2012-06-09 13:18:12 +09:00 коммит произвёл Matthew Garrett
Родитель 014fc8fbec
Коммит ca3c2c706d
1 изменённых файлов: 12 добавлений и 13 удалений

Просмотреть файл

@ -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",
&handle))) {
int arg = 1;
@ -2659,12 +2665,6 @@ static int sony_nc_add(struct acpi_device *device)
}
/* 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()) {
pr_info("brightness ignored, must be controlled by ACPI video driver\n");
} else {
@ -2717,13 +2717,12 @@ static int sony_nc_add(struct acpi_device *device)
device_remove_file(&sony_pf_device->dev, &item->devattr);
}
sony_nc_backlight_cleanup();
sony_laptop_remove_input();
outsnc:
sony_nc_function_cleanup(sony_pf_device);
sony_nc_handles_cleanup(sony_pf_device);
outplatform:
sony_laptop_remove_input();
outpresent:
sony_pf_remove();