[PATCH] hwmon: (2/3) pc87360 driver update
[PATCH] hwmon: (2/3) pc87360 driver update

pc87360: number-skew to init

The temp, therm, fan, pwm callbacks all have an offset skew in the code
which accommodates attribute numbering conventions under
/sys/bus/i2c/devices/9191-6620/ (ie they start at 1)

This patch moves that skew into the declaration, and out of the
functions (except for therm, where we simplify from 2 skews to 1). The
declarative skew is clearer, less error-prone, and more efficient.

The use of 11+offset-4 below reflects the fact that the sysfs numbering
of these units is 4, 5, 6, but they use internal VLM units 11, 12, 13 to
measure the thermistor voltages.

There's one remaining skew factor, in *_crit callbacks below, because
there are no critical thresholds for voltages 0-10, only for those
supporting the thermistors.

Signed-off-by: Jim Cromie <ad2f2d00caa0a51cbc8e4980f7c1a44e594c74aa@gmail.com>
Signed-off-by: Jean Delvare <49ad6a9f5aa17024c23048df346d55bda6837e01@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@suse.de>

KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas