* [lm-sensors] [patchset 7/23] pc87360 pwm use attr->index
@ 2005-08-01 23:08 Jim Cromie
0 siblings, 0 replies; only message in thread
From: Jim Cromie @ 2005-08-01 23:08 UTC (permalink / raw)
To: lm-sensors
use attr->index instead of offset in pwm get/set macros
[jimc@harpo pset]$ diffstat 04x-sda-pwm-quell-warns
pc87360.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Signed-off-by: Jim Cromie <jcromie@divsol.com>
-------------- next part --------------
diff -ruNp -X exclude-diffs lxC-6/drivers/hwmon/pc87360.c lxC-7/drivers/hwmon/pc87360.c
--- lxC-6/drivers/hwmon/pc87360.c 2005-07-31 12:11:15.000000000 -0600
+++ lxC-7/drivers/hwmon/pc87360.c 2005-07-31 12:11:59.000000000 -0600
@@ -328,7 +328,7 @@ static ssize_t show_pwm##offset(struct d
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); \
struct pc87360_data *data = pc87360_update_device(dev); \
return sprintf(buf, "%u\n", \
- PWM_FROM_REG(data->pwm[offset-1], \
+ PWM_FROM_REG(data->pwm[attr->index-1], \
FAN_CONFIG_INVERT(data->fan_conf, \
offset-1))); \
} \
@@ -341,10 +341,10 @@ static ssize_t set_pwm##offset(struct de
long val = simple_strtol(buf, NULL, 10); \
\
down(&data->update_lock); \
- data->pwm[offset-1] = PWM_TO_REG(val, \
+ data->pwm[attr->index-1] = PWM_TO_REG(val, \
FAN_CONFIG_INVERT(data->fan_conf, offset-1)); \
pc87360_write_value(data, LD_FAN, NO_BANK, PC87360_REG_PWM(offset-1), \
- data->pwm[offset-1]); \
+ data->pwm[attr->index-1]); \
up(&data->update_lock); \
return count; \
} \
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-08-01 23:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-01 23:08 [lm-sensors] [patchset 7/23] pc87360 pwm use attr->index Jim Cromie
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.