diff options
-rw-r--r-- | drivers/acpi/ibm_acpi.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index ce69f7592a22..b81a95d2067c 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c | |||
@@ -584,8 +584,7 @@ static int wan_status(void) | |||
584 | { | 584 | { |
585 | int status; | 585 | int status; |
586 | 586 | ||
587 | if (!wan_supported || | 587 | if (!wan_supported || !acpi_evalf(hkey_handle, &status, "GWAN", "d")) |
588 | !acpi_evalf(hkey_handle, &status, "GWAN", "d")) | ||
589 | status = 0; | 588 | status = 0; |
590 | 589 | ||
591 | return status; | 590 | return status; |
@@ -910,6 +909,7 @@ static int _sta(acpi_handle handle) | |||
910 | 909 | ||
911 | return status; | 910 | return status; |
912 | } | 911 | } |
912 | |||
913 | #ifdef CONFIG_ACPI_IBM_DOCK | 913 | #ifdef CONFIG_ACPI_IBM_DOCK |
914 | #define dock_docked() (_sta(dock_handle) & 1) | 914 | #define dock_docked() (_sta(dock_handle) & 1) |
915 | 915 | ||
@@ -1386,12 +1386,12 @@ static int brightness_offset = 0x31; | |||
1386 | 1386 | ||
1387 | static int brightness_get(struct backlight_device *bd) | 1387 | static int brightness_get(struct backlight_device *bd) |
1388 | { | 1388 | { |
1389 | u8 level; | 1389 | u8 level; |
1390 | if (!acpi_ec_read(brightness_offset, &level)) | 1390 | if (!acpi_ec_read(brightness_offset, &level)) |
1391 | return -EIO; | 1391 | return -EIO; |
1392 | 1392 | ||
1393 | level &= 0x7; | 1393 | level &= 0x7; |
1394 | return level; | 1394 | return level; |
1395 | } | 1395 | } |
1396 | 1396 | ||
1397 | static int brightness_read(char *p) | 1397 | static int brightness_read(char *p) |
@@ -1993,10 +1993,10 @@ IBM_PARAM(volume); | |||
1993 | IBM_PARAM(fan); | 1993 | IBM_PARAM(fan); |
1994 | 1994 | ||
1995 | static struct backlight_properties ibm_backlight_data = { | 1995 | static struct backlight_properties ibm_backlight_data = { |
1996 | .owner = THIS_MODULE, | 1996 | .owner = THIS_MODULE, |
1997 | .get_brightness = brightness_get, | 1997 | .get_brightness = brightness_get, |
1998 | .update_status = brightness_update_status, | 1998 | .update_status = brightness_update_status, |
1999 | .max_brightness = 7, | 1999 | .max_brightness = 7, |
2000 | }; | 2000 | }; |
2001 | 2001 | ||
2002 | static void acpi_ibm_exit(void) | 2002 | static void acpi_ibm_exit(void) |
@@ -2075,7 +2075,7 @@ static int __init acpi_ibm_init(void) | |||
2075 | 2075 | ||
2076 | ibm_backlight_device = backlight_device_register("ibm", NULL, | 2076 | ibm_backlight_device = backlight_device_register("ibm", NULL, |
2077 | &ibm_backlight_data); | 2077 | &ibm_backlight_data); |
2078 | if (IS_ERR(ibm_backlight_device)) { | 2078 | if (IS_ERR(ibm_backlight_device)) { |
2079 | printk(IBM_ERR "Could not register ibm backlight device\n"); | 2079 | printk(IBM_ERR "Could not register ibm backlight device\n"); |
2080 | ibm_backlight_device = NULL; | 2080 | ibm_backlight_device = NULL; |
2081 | acpi_ibm_exit(); | 2081 | acpi_ibm_exit(); |