platform/x86: asus-wmi: Use clamp_val() instead of open coded variant
There is no need to open code clamp_val() macro implementation. Replace the corresponding lines with direct call to clamp_val(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
a5556fa110
commit
2275752004
|
@ -464,12 +464,7 @@ static void do_kbd_led_set(struct led_classdev *led_cdev, int value)
|
|||
asus = container_of(led_cdev, struct asus_wmi, kbd_led);
|
||||
max_level = asus->kbd_led.max_brightness;
|
||||
|
||||
if (value > max_level)
|
||||
value = max_level;
|
||||
else if (value < 0)
|
||||
value = 0;
|
||||
|
||||
asus->kbd_led_wk = value;
|
||||
asus->kbd_led_wk = clamp_val(value, 0, max_level);
|
||||
kbd_led_update(asus);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue