Simply write the desired value to the register. This seems to work, unlike the previous complex method. Signed-off-by: Matan Ziv-Av <matan@xxxxxxxxxxx> --- drivers/platform/x86/lg-laptop.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c index ab79457d5ffe..2f0ce69d8e31 100644 --- a/drivers/platform/x86/lg-laptop.c +++ b/drivers/platform/x86/lg-laptop.c @@ -298,9 +298,8 @@ static ssize_t fan_mode_store(struct device *dev, m = r->integer.value; kfree(r); - r = lg_wmab(WM_FAN_MODE, WM_SET, (m & 0xffffff0f) | (value << 4)); - kfree(r); - r = lg_wmab(WM_FAN_MODE, WM_SET, (m & 0xfffffff0) | value); + r = lg_wmab(WM_FAN_MODE, WM_SET, (m & 0xffffff0f) | + (value << 4) | value); kfree(r); return count; -- 2.21.0