mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 17:23:55 +08:00
ACPI: ibm-acpi: improve backlight power handling
Improve the backlight code to emulate as much as possible the power management events, as we are unable to really power on or power off the backlight. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
2bc808a8c4
commit
c9bf296b64
@ -86,6 +86,7 @@
|
||||
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/backlight.h>
|
||||
#include <linux/fb.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
#include <linux/dmi.h>
|
||||
@ -1707,7 +1708,10 @@ static int brightness_write(char *buf)
|
||||
|
||||
static int brightness_update_status(struct backlight_device *bd)
|
||||
{
|
||||
return brightness_set(bd->props.brightness);
|
||||
return brightness_set(
|
||||
(bd->props.fb_blank == FB_BLANK_UNBLANK &&
|
||||
bd->props.power == FB_BLANK_UNBLANK) ?
|
||||
bd->props.brightness : 0);
|
||||
}
|
||||
|
||||
static struct backlight_ops ibm_backlight_data = {
|
||||
|
Loading…
Reference in New Issue
Block a user