]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (ina2xx) Use structure array to distinguish chip types
authorGuenter Roeck <linux@roeck-us.net>
Sat, 12 May 2012 18:21:01 +0000 (11:21 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 12 Sep 2012 13:43:01 +0000 (06:43 -0700)
commitf00060beb27991d320f6414f6b96257bba4c6ade
treed2d8658a41903727fb630cdfc49754be3495e98c
parentac4b8834e526a46282e2a634bbef9ee68ab4f910
hwmon: (ina2xx) Use structure array to distinguish chip types

Replace per-device initialization and per-device calculation code with
per-device configuration data, which is then used to configure the chip and
perform calculations based on that data.

This patch reduces code size by more than 400 bytes on x86_64.

Cc: Lothar Felten <l-felten@ti.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/ina2xx.c