提交 1ddec2f9 编写于 作者: C Corentin Chary 提交者: Len Brown

eeepc-laptop: right parent device

Signed-off-by: NCorentin Chary <corentincj@iksaif.net>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 7de39389
...@@ -1143,18 +1143,6 @@ static int __init eeepc_laptop_init(void) ...@@ -1143,18 +1143,6 @@ static int __init eeepc_laptop_init(void)
acpi_bus_unregister_driver(&eeepc_hotk_driver); acpi_bus_unregister_driver(&eeepc_hotk_driver);
return -ENODEV; return -ENODEV;
} }
dev = acpi_get_physical_device(ehotk->device->handle);
if (!acpi_video_backlight_support()) {
result = eeepc_backlight_init(dev);
if (result)
goto fail_backlight;
} else
pr_info("Backlight controlled by ACPI video driver\n");
result = eeepc_hwmon_init(dev);
if (result)
goto fail_hwmon;
eeepc_enable_camera(); eeepc_enable_camera();
...@@ -1175,12 +1163,30 @@ static int __init eeepc_laptop_init(void) ...@@ -1175,12 +1163,30 @@ static int __init eeepc_laptop_init(void)
if (result) if (result)
goto fail_sysfs; goto fail_sysfs;
dev = &platform_device->dev;
if (!acpi_video_backlight_support()) {
result = eeepc_backlight_init(dev);
if (result)
goto fail_backlight;
} else
pr_info("Backlight controlled by ACPI video "
"driver\n");
result = eeepc_hwmon_init(dev);
if (result)
goto fail_hwmon;
result = eeepc_rfkill_init(dev); result = eeepc_rfkill_init(dev);
if (result) if (result)
goto fail_rfkill; goto fail_rfkill;
return 0; return 0;
fail_rfkill: fail_rfkill:
eeepc_hwmon_exit();
fail_hwmon:
eeepc_backlight_exit();
fail_backlight:
sysfs_remove_group(&platform_device->dev.kobj, sysfs_remove_group(&platform_device->dev.kobj,
&platform_attribute_group); &platform_attribute_group);
fail_sysfs: fail_sysfs:
...@@ -1190,10 +1196,6 @@ static int __init eeepc_laptop_init(void) ...@@ -1190,10 +1196,6 @@ static int __init eeepc_laptop_init(void)
fail_platform_device1: fail_platform_device1:
platform_driver_unregister(&platform_driver); platform_driver_unregister(&platform_driver);
fail_platform_driver: fail_platform_driver:
eeepc_hwmon_exit();
fail_hwmon:
eeepc_backlight_exit();
fail_backlight:
eeepc_input_exit(); eeepc_input_exit();
return result; return result;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册