Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154208
b: refs/heads/master
c: 116bf2e
h: refs/heads/master
v: v3
  • Loading branch information
Corentin Chary authored and Len Brown committed Jun 24, 2009
1 parent 25a0816 commit 5375bde
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cede2cb6ee9b0ddaa3dbc9939418ff177a831600
refs/heads/master: 116bf2e010a0600371aede450351973821dfd9e2
40 changes: 19 additions & 21 deletions trunk/drivers/platform/x86/asus-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,6 @@ static int asus_led_init(struct device *dev)

static int __init asus_laptop_init(void)
{
struct device *dev;
int result;

if (acpi_disabled)
Expand All @@ -1343,24 +1342,10 @@ static int __init asus_laptop_init(void)
return -ENODEV;
}

dev = acpi_get_physical_device(hotk->device->handle);

if (!acpi_video_backlight_support()) {
result = asus_backlight_init(dev);
if (result)
goto fail_backlight;
} else
printk(ASUS_INFO "Brightness ignored, must be controlled by "
"ACPI video driver\n");

result = asus_input_init();
if (result)
goto fail_input;

result = asus_led_init(dev);
if (result)
goto fail_led;

/* Register platform stuff */
result = platform_driver_register(&asuspf_driver);
if (result)
Expand All @@ -1381,8 +1366,27 @@ static int __init asus_laptop_init(void)
if (result)
goto fail_sysfs;

result = asus_led_init(&asuspf_device->dev);
if (result)
goto fail_led;

if (!acpi_video_backlight_support()) {
result = asus_backlight_init(&asuspf_device->dev);
if (result)
goto fail_backlight;
} else
printk(ASUS_INFO "Brightness ignored, must be controlled by "
"ACPI video driver\n");

return 0;

fail_backlight:
asus_led_exit();

fail_led:
sysfs_remove_group(&asuspf_device->dev.kobj,
&asuspf_attribute_group);

fail_sysfs:
platform_device_del(asuspf_device);

Expand All @@ -1393,15 +1397,9 @@ static int __init asus_laptop_init(void)
platform_driver_unregister(&asuspf_driver);

fail_platform_driver:
asus_led_exit();

fail_led:
asus_input_exit();

fail_input:
asus_backlight_exit();

fail_backlight:

return result;
}
Expand Down

0 comments on commit 5375bde

Please sign in to comment.