All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH 1/4] drivers/hwmon/ltc4261: set data->valid to
@ 2012-01-02 11:03 Frans Meulenbroeks
  2012-01-02 16:17 ` [lm-sensors] [PATCH 1/4] drivers/hwmon/ltc4261: set data->valid Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Frans Meulenbroeks @ 2012-01-02 11:03 UTC (permalink / raw)
  To: lm-sensors

if there is an error it is better to set data->valid to 0
so the next call to ltc4261_update_device will always be
executed

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
---
patch is against the hwmon staging tree
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
as retrieved on jan 2, 2012

 drivers/hwmon/ltc4261.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/hwmon/ltc4261.c b/drivers/hwmon/ltc4261.c
index 4b50601..ce52355 100644
--- a/drivers/hwmon/ltc4261.c
+++ b/drivers/hwmon/ltc4261.c
@@ -85,6 +85,7 @@ static struct ltc4261_data *ltc4261_update_device(struct device *dev)
 					"Failed to read ADC value: error %d\n",
 					val);
 				ret = ERR_PTR(val);
+				data->valid = 0;
 				goto abort;
 			}
 			data->regs[i] = val;
-- 
1.7.0.4


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [lm-sensors] [PATCH 1/4] drivers/hwmon/ltc4261: set data->valid
  2012-01-02 11:03 [lm-sensors] [PATCH 1/4] drivers/hwmon/ltc4261: set data->valid to Frans Meulenbroeks
@ 2012-01-02 16:17 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2012-01-02 16:17 UTC (permalink / raw)
  To: lm-sensors

On Mon, Jan 02, 2012 at 06:03:20AM -0500, Frans Meulenbroeks wrote:
> if there is an error it is better to set data->valid to 0
> so the next call to ltc4261_update_device will always be
> executed
> 
> Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>

Makes sense. Applied.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-02 16:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-02 11:03 [lm-sensors] [PATCH 1/4] drivers/hwmon/ltc4261: set data->valid to Frans Meulenbroeks
2012-01-02 16:17 ` [lm-sensors] [PATCH 1/4] drivers/hwmon/ltc4261: set data->valid Guenter Roeck

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.