Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48700
b: refs/heads/master
c: 7df03b8
h: refs/heads/master
v: v3
  • Loading branch information
Mattia Dongili authored and Len Brown committed Feb 13, 2007
1 parent 749d8c8 commit 0f60cce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57ede701af3bc0c153070133e7831332ffa1d761
refs/heads/master: 7df03b82ed081777d2393ff8a5fb9d4a3a560f26
8 changes: 8 additions & 0 deletions trunk/drivers/acpi/sony_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,14 @@ static int sony_acpi_add(struct acpi_device *device)
if (ACPI_SUCCESS(acpi_get_handle(sony_acpi_handle, "GBRT", &handle))) {
sony_backlight_device = backlight_device_register("sony", NULL,
NULL, &sony_backlight_properties);

if (IS_ERR(sony_backlight_device)) {
printk(LOG_PFX "unable to register backlight device\n");
sony_backlight_device = NULL;
}
else
sony_backlight_properties.brightness =
sony_backlight_get_brightness(sony_backlight_device);
}

for (item = sony_acpi_values; item->name; ++item) {
Expand Down Expand Up @@ -400,6 +405,9 @@ static int sony_acpi_add(struct acpi_device *device)
return 0;

outproc:
if (sony_backlight_device)
backlight_device_unregister(sony_backlight_device);

for (item = sony_acpi_values; item->name; ++item)
if (item->proc)
remove_proc_entry(item->name, acpi_device_dir(device));
Expand Down

0 comments on commit 0f60cce

Please sign in to comment.