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: NGuenter Roeck <linux@roeck-us.net> Acked-by: NJean Delvare <khali@linux-fr.org>
Showing
想要评论请 注册 或 登录