hwmon: (emc1403) Convert to with_info API
authorGuenter Roeck <linux@roeck-us.net>
Sun, 28 Nov 2021 18:06:14 +0000 (10:06 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 7 May 2024 13:23:21 +0000 (06:23 -0700)
commit1094360dc860e3578b3ec1889b05c88462ff189e
treebc8f40924807114c955154bc437661788b2fd68a
parent45bf8305fb2ef684e53fd0dcf1cc7e7b456f3478
hwmon: (emc1403) Convert to with_info API

Convert driver to register with the hwmon subsystem using
devm_hwmon_device_register_with_info() instead of
devm_hwmon_device_register_with_groups() to simplify the code
and to reduce its size. As side effect, this also fixes a couple
of overflow problems when writing limit and hysteresis registers.

Cc: Lars Petter Mostad <lars.petter.mostad@appear.net>
Tested-by: Lars Petter Mostad <lars.petter.mostad@appear.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/emc1403.c