Skip to content
Commit df48ed80 authored by Jim Cromie's avatar Jim Cromie Committed by Mark M. Hoffman
Browse files

hwmon: (w83627hf) hoist nr-1 offset out of show-store-temp-X



This hoists nr-1 offset out of (show|store)_temp_*(.*) callbacks, and into
SENSOR_DEVICE_ATTRs for sysfs tempN_X files.  It also combines
temp[1] and temp_add[2] (array) fields in w83627hf_data into 3 elem arrays,
which simplifies special-case handling of nr, allowing simplification
of callback bodies and rerolling a flattened loop in
w83627hf_update_device(struct device *dev).

The array conversion changes temp[1] from u8 to u16, but this was
happening implicitly via the helper functions anyway.

Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarMark M. Hoffman <mhoffman@lightlink.com>
parent 38fb56a2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment