Commit 22757520 authored by Andy Shevchenko's avatar Andy Shevchenko

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent a5556fa1
...@@ -464,12 +464,7 @@ static void do_kbd_led_set(struct led_classdev *led_cdev, int value) ...@@ -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); asus = container_of(led_cdev, struct asus_wmi, kbd_led);
max_level = asus->kbd_led.max_brightness; max_level = asus->kbd_led.max_brightness;
if (value > max_level) asus->kbd_led_wk = clamp_val(value, 0, max_level);
value = max_level;
else if (value < 0)
value = 0;
asus->kbd_led_wk = value;
kbd_led_update(asus); kbd_led_update(asus);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment