]> 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>
Sat, 15 Sep 2012 14:57:33 +0000 (07:57 -0700)
commit45368369bf4ecb842a36186d3f19498a73e77914
treeacd6ac1ea7b9cbda83500add1c6c36cb58565b41
parent167d9c35cf4320603362efd00a19a55880d0d3df
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