]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.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>
Mon, 24 Sep 2012 04:08:34 +0000 (21:08 -0700)
commit6106db25c27550337a1d701631093cdfc645aa7b
tree22797d324f513dd903c702801d70248be24159cf
parent9224c38a312a339f1c9c2115a1f379c9f8f1731e
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