diff options
author | Corentin Chary <corentincj@iksaif.net> | 2009-06-25 07:25:39 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-06-26 00:23:40 -0400 |
commit | 1ddec2f9435e77b4d3f50eced68c4c942f2bcd4b (patch) | |
tree | 0e1819e919a0fa6ead31c9e3495454ce85429942 /drivers | |
parent | 7de39389d8f61aa517ce2a8b4d925acc62696ae5 (diff) |
eeepc-laptop: right parent device
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index e46981a5f20b..5b102c2f66a0 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -1143,18 +1143,6 @@ static int __init eeepc_laptop_init(void) | |||
1143 | acpi_bus_unregister_driver(&eeepc_hotk_driver); | 1143 | acpi_bus_unregister_driver(&eeepc_hotk_driver); |
1144 | return -ENODEV; | 1144 | return -ENODEV; |
1145 | } | 1145 | } |
1146 | dev = acpi_get_physical_device(ehotk->device->handle); | ||
1147 | |||
1148 | if (!acpi_video_backlight_support()) { | ||
1149 | result = eeepc_backlight_init(dev); | ||
1150 | if (result) | ||
1151 | goto fail_backlight; | ||
1152 | } else | ||
1153 | pr_info("Backlight controlled by ACPI video driver\n"); | ||
1154 | |||
1155 | result = eeepc_hwmon_init(dev); | ||
1156 | if (result) | ||
1157 | goto fail_hwmon; | ||
1158 | 1146 | ||
1159 | eeepc_enable_camera(); | 1147 | eeepc_enable_camera(); |
1160 | 1148 | ||
@@ -1175,12 +1163,30 @@ static int __init eeepc_laptop_init(void) | |||
1175 | if (result) | 1163 | if (result) |
1176 | goto fail_sysfs; | 1164 | goto fail_sysfs; |
1177 | 1165 | ||
1166 | dev = &platform_device->dev; | ||
1167 | |||
1168 | if (!acpi_video_backlight_support()) { | ||
1169 | result = eeepc_backlight_init(dev); | ||
1170 | if (result) | ||
1171 | goto fail_backlight; | ||
1172 | } else | ||
1173 | pr_info("Backlight controlled by ACPI video " | ||
1174 | "driver\n"); | ||
1175 | |||
1176 | result = eeepc_hwmon_init(dev); | ||
1177 | if (result) | ||
1178 | goto fail_hwmon; | ||
1179 | |||
1178 | result = eeepc_rfkill_init(dev); | 1180 | result = eeepc_rfkill_init(dev); |
1179 | if (result) | 1181 | if (result) |
1180 | goto fail_rfkill; | 1182 | goto fail_rfkill; |
1181 | 1183 | ||
1182 | return 0; | 1184 | return 0; |
1183 | fail_rfkill: | 1185 | fail_rfkill: |
1186 | eeepc_hwmon_exit(); | ||
1187 | fail_hwmon: | ||
1188 | eeepc_backlight_exit(); | ||
1189 | fail_backlight: | ||
1184 | sysfs_remove_group(&platform_device->dev.kobj, | 1190 | sysfs_remove_group(&platform_device->dev.kobj, |
1185 | &platform_attribute_group); | 1191 | &platform_attribute_group); |
1186 | fail_sysfs: | 1192 | fail_sysfs: |
@@ -1190,10 +1196,6 @@ fail_platform_device2: | |||
1190 | fail_platform_device1: | 1196 | fail_platform_device1: |
1191 | platform_driver_unregister(&platform_driver); | 1197 | platform_driver_unregister(&platform_driver); |
1192 | fail_platform_driver: | 1198 | fail_platform_driver: |
1193 | eeepc_hwmon_exit(); | ||
1194 | fail_hwmon: | ||
1195 | eeepc_backlight_exit(); | ||
1196 | fail_backlight: | ||
1197 | eeepc_input_exit(); | 1199 | eeepc_input_exit(); |
1198 | return result; | 1200 | return result; |
1199 | } | 1201 | } |