All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] hwmon: (it87) Ensure that pwm control cache is current before" failed to apply to 4.4-stable tree
@ 2017-03-08 10:03 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-08 10:03 UTC (permalink / raw)
  To: linux, kfolz; +Cc: stable


The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

>From 82dbe987b70042b340f851bdc969a971081e5f02 Mon Sep 17 00:00:00 2001
From: Guenter Roeck <linux@roeck-us.net>
Date: Wed, 8 Feb 2017 14:02:59 -0800
Subject: [PATCH] hwmon: (it87) Ensure that pwm control cache is current before
 updating values

If sensor attributes were never read, the pwm control data has not been
initiialized, which can cause wrong driver behavior. Ensure that cached
data is current before acting on it.

Cc: stable@vger.kernel.org # 4.4+
Reported-by: Kevin Folz <kfolz@evertz.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 11a28b233006..85918d8a747a 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -1360,6 +1360,7 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *attr,
 		return -EINVAL;
 
 	mutex_lock(&data->update_lock);
+	it87_update_pwm_ctrl(data, nr);
 	if (has_newer_autopwm(data)) {
 		/*
 		 * If we are in automatic mode, the PWM duty cycle register
@@ -1472,6 +1473,7 @@ static ssize_t set_pwm_temp_map(struct device *dev,
 	}
 
 	mutex_lock(&data->update_lock);
+	it87_update_pwm_ctrl(data, nr);
 	data->pwm_temp_map[nr] = reg;
 	/*
 	 * If we are in automatic mode, write the temp mapping immediately;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-08 10:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-08 10:03 FAILED: patch "[PATCH] hwmon: (it87) Ensure that pwm control cache is current before" failed to apply to 4.4-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.