Skip to contentSkip to conversation

drivers/hwmon/ltc4261: set data->valid to

PATCH In review Frans Meulenbroeks 2 participants 2 messages Jan 2, 2012 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 drivers/hwmon/ltc4261: set data->valid to

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

---
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(-)
drivers/hwmon/ltc4261.c +1 -0
index 4b50601..ce52355 100644
@@ -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;
Signature · 7 lines
1.7.0.4


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw

Re: [lm-sensors] [PATCH 1/4] drivers/hwmon/ltc4261: set data->valid

Quoted 5 lines · Frans Meulenbroeks

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

Makes sense. Applied.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors