diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/ibm_acpi.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index 4cc534e36e81..7c1b418676b9 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c | |||
@@ -1711,6 +1711,12 @@ static struct backlight_ops ibm_backlight_data = { | |||
1711 | 1711 | ||
1712 | static int brightness_init(void) | 1712 | static int brightness_init(void) |
1713 | { | 1713 | { |
1714 | int b; | ||
1715 | |||
1716 | b = brightness_get(NULL); | ||
1717 | if (b < 0) | ||
1718 | return b; | ||
1719 | |||
1714 | ibm_backlight_device = backlight_device_register("ibm", NULL, NULL, | 1720 | ibm_backlight_device = backlight_device_register("ibm", NULL, NULL, |
1715 | &ibm_backlight_data); | 1721 | &ibm_backlight_data); |
1716 | if (IS_ERR(ibm_backlight_device)) { | 1722 | if (IS_ERR(ibm_backlight_device)) { |
@@ -1718,7 +1724,9 @@ static int brightness_init(void) | |||
1718 | return PTR_ERR(ibm_backlight_device); | 1724 | return PTR_ERR(ibm_backlight_device); |
1719 | } | 1725 | } |
1720 | 1726 | ||
1721 | ibm_backlight_device->props.max_brightness = 7; | 1727 | ibm_backlight_device->props.max_brightness = 7; |
1728 | ibm_backlight_device->props.brightness = b; | ||
1729 | backlight_update_status(ibm_backlight_device); | ||
1722 | 1730 | ||
1723 | return 0; | 1731 | return 0; |
1724 | } | 1732 | } |