diff options
author | Corentin Chary <corentincj@iksaif.net> | 2010-08-24 03:30:44 -0400 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2010-10-21 09:36:43 -0400 |
commit | 71e687dc499819caa0d6ee0f80dcda1d5c24b5b2 (patch) | |
tree | 33b70e066417a74e90b093816ae7796b5e0a3eb7 /drivers/platform/x86/eeepc-laptop.c | |
parent | 384a7cd9ace5b37a17ffea436f09170cdf671c88 (diff) |
platform-x86: sync eeepc-laptop and asus-laptop
Makes asus-laptop and eeepc-laptop _init/_exit functions
looks exactly the same as they do the same thing.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform/x86/eeepc-laptop.c')
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 6b8e06206c4..b2edfdcdcb8 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -165,6 +165,7 @@ struct eeepc_laptop { | |||
165 | u16 event_count[128]; /* count for each event */ | 165 | u16 event_count[128]; /* count for each event */ |
166 | 166 | ||
167 | struct platform_device *platform_device; | 167 | struct platform_device *platform_device; |
168 | struct acpi_device *device; /* the device we are in */ | ||
168 | struct device *hwmon_device; | 169 | struct device *hwmon_device; |
169 | struct backlight_device *backlight_device; | 170 | struct backlight_device *backlight_device; |
170 | 171 | ||
@@ -1193,9 +1194,9 @@ static int eeepc_input_init(struct eeepc_laptop *eeepc) | |||
1193 | eeepc->inputdev = input; | 1194 | eeepc->inputdev = input; |
1194 | return 0; | 1195 | return 0; |
1195 | 1196 | ||
1196 | err_free_keymap: | 1197 | err_free_keymap: |
1197 | sparse_keymap_free(input); | 1198 | sparse_keymap_free(input); |
1198 | err_free_dev: | 1199 | err_free_dev: |
1199 | input_free_device(input); | 1200 | input_free_device(input); |
1200 | return error; | 1201 | return error; |
1201 | } | 1202 | } |
@@ -1206,6 +1207,7 @@ static void eeepc_input_exit(struct eeepc_laptop *eeepc) | |||
1206 | sparse_keymap_free(eeepc->inputdev); | 1207 | sparse_keymap_free(eeepc->inputdev); |
1207 | input_unregister_device(eeepc->inputdev); | 1208 | input_unregister_device(eeepc->inputdev); |
1208 | } | 1209 | } |
1210 | eeepc->inputdev = NULL; | ||
1209 | } | 1211 | } |
1210 | 1212 | ||
1211 | /* | 1213 | /* |
@@ -1326,16 +1328,15 @@ static void cmsg_quirks(struct eeepc_laptop *eeepc) | |||
1326 | cmsg_quirk(eeepc, CM_ASL_TPD, "TPD"); | 1328 | cmsg_quirk(eeepc, CM_ASL_TPD, "TPD"); |
1327 | } | 1329 | } |
1328 | 1330 | ||
1329 | static int eeepc_acpi_init(struct eeepc_laptop *eeepc, | 1331 | static int __devinit eeepc_acpi_init(struct eeepc_laptop *eeepc) |
1330 | struct acpi_device *device) | ||
1331 | { | 1332 | { |
1332 | unsigned int init_flags; | 1333 | unsigned int init_flags; |
1333 | int result; | 1334 | int result; |
1334 | 1335 | ||
1335 | result = acpi_bus_get_status(device); | 1336 | result = acpi_bus_get_status(eeepc->device); |
1336 | if (result) | 1337 | if (result) |
1337 | return result; | 1338 | return result; |
1338 | if (!device->status.present) { | 1339 | if (!eeepc->device->status.present) { |
1339 | pr_err("Hotkey device not present, aborting\n"); | 1340 | pr_err("Hotkey device not present, aborting\n"); |
1340 | return -ENODEV; | 1341 | return -ENODEV; |
1341 | } | 1342 | } |
@@ -1384,12 +1385,13 @@ static int __devinit eeepc_acpi_add(struct acpi_device *device) | |||
1384 | strcpy(acpi_device_name(device), EEEPC_ACPI_DEVICE_NAME); | 1385 | strcpy(acpi_device_name(device), EEEPC_ACPI_DEVICE_NAME); |
1385 | strcpy(acpi_device_class(device), EEEPC_ACPI_CLASS); | 1386 | strcpy(acpi_device_class(device), EEEPC_ACPI_CLASS); |
1386 | device->driver_data = eeepc; | 1387 | device->driver_data = eeepc; |
1388 | eeepc->device = device; | ||
1387 | 1389 | ||
1388 | eeepc->hotplug_disabled = hotplug_disabled; | 1390 | eeepc->hotplug_disabled = hotplug_disabled; |
1389 | 1391 | ||
1390 | eeepc_dmi_check(eeepc); | 1392 | eeepc_dmi_check(eeepc); |
1391 | 1393 | ||
1392 | result = eeepc_acpi_init(eeepc, device); | 1394 | result = eeepc_acpi_init(eeepc); |
1393 | if (result) | 1395 | if (result) |
1394 | goto fail_platform; | 1396 | goto fail_platform; |
1395 | eeepc_enable_camera(eeepc); | 1397 | eeepc_enable_camera(eeepc); |