From 9ec34fd74a9316539c1f86be040624ff8aadff92 Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Thu, 25 Jun 2009 13:25:39 +0200 Subject: [PATCH] --- yaml --- r: 154382 b: refs/heads/master c: 1ddec2f9435e77b4d3f50eced68c4c942f2bcd4b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/platform/x86/eeepc-laptop.c | 34 ++++++++++++----------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/[refs] b/[refs] index 1ae7ad14e501..f3a76bfdee62 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7de39389d8f61aa517ce2a8b4d925acc62696ae5 +refs/heads/master: 1ddec2f9435e77b4d3f50eced68c4c942f2bcd4b diff --git a/trunk/drivers/platform/x86/eeepc-laptop.c b/trunk/drivers/platform/x86/eeepc-laptop.c index e46981a5f20b..5b102c2f66a0 100644 --- a/trunk/drivers/platform/x86/eeepc-laptop.c +++ b/trunk/drivers/platform/x86/eeepc-laptop.c @@ -1143,18 +1143,6 @@ static int __init eeepc_laptop_init(void) acpi_bus_unregister_driver(&eeepc_hotk_driver); 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(); @@ -1175,12 +1163,30 @@ static int __init eeepc_laptop_init(void) if (result) 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); if (result) goto fail_rfkill; return 0; fail_rfkill: + eeepc_hwmon_exit(); +fail_hwmon: + eeepc_backlight_exit(); +fail_backlight: sysfs_remove_group(&platform_device->dev.kobj, &platform_attribute_group); fail_sysfs: @@ -1190,10 +1196,6 @@ static int __init eeepc_laptop_init(void) fail_platform_device1: platform_driver_unregister(&platform_driver); fail_platform_driver: - eeepc_hwmon_exit(); -fail_hwmon: - eeepc_backlight_exit(); -fail_backlight: eeepc_input_exit(); return result; }