Message ID | 1265096351-15239-4-git-send-email-corentincj@iksaif.net (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Len Brown |
Headers | show |
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 1d799b3..013ab86 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -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)