mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
asus-laptop: no need to check argument of set_brightness()
We already tell the backlight class our maximum brightness value; it will validate the user requested values for us. Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
parent
c45eecf871
commit
e5b50f6a2b
@ -571,17 +571,11 @@ static int read_brightness(struct backlight_device *bd)
|
||||
|
||||
static int set_brightness(struct backlight_device *bd, int value)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
value = (0 < value) ? ((15 < value) ? 15 : value) : 0;
|
||||
/* 0 <= value <= 15 */
|
||||
|
||||
if (write_acpi_int(brightness_set_handle, NULL, value, NULL)) {
|
||||
pr_warning("Error changing brightness\n");
|
||||
ret = -EIO;
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int update_bl_status(struct backlight_device *bd)
|
||||
|
Loading…
Reference in New Issue
Block a user