aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/eeepc-laptop.c2
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 98935f945f53..5d26e70bed6c 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -1007,7 +1007,7 @@ static int eeepc_get_fan_pwm(void)
1007 1007
1008static void eeepc_set_fan_pwm(int value) 1008static void eeepc_set_fan_pwm(int value)
1009{ 1009{
1010 value = SENSORS_LIMIT(value, 0, 255); 1010 value = clamp_val(value, 0, 255);
1011 value = value * 100 / 255; 1011 value = value * 100 / 255;
1012 ec_write(EEEPC_EC_FAN_PWM, value); 1012 ec_write(EEEPC_EC_FAN_PWM, value);
1013} 1013}
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index f946ca7cb762..ebcb461bb2b0 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -4877,8 +4877,7 @@ static int __init light_init(struct ibm_init_struct *iibm)
4877static void light_exit(void) 4877static void light_exit(void)
4878{ 4878{
4879 led_classdev_unregister(&tpacpi_led_thinklight.led_classdev); 4879 led_classdev_unregister(&tpacpi_led_thinklight.led_classdev);
4880 if (work_pending(&tpacpi_led_thinklight.work)) 4880 flush_workqueue(tpacpi_wq);
4881 flush_workqueue(tpacpi_wq);
4882} 4881}
4883 4882
4884static int light_read(struct seq_file *m) 4883static int light_read(struct seq_file *m)