hwmon: (mcp3021) improve driver support for newer hwmon interface
authorMarc Ferland <ferlandm@amotus.ca>
Tue, 12 Jul 2022 19:35:04 +0000 (15:35 -0400)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 15 Jul 2022 17:55:57 +0000 (10:55 -0700)
commit03508eea538557b4f61bf1df2e842d252cb9a6e6
tree69a31113d6d789d309ab669b958df29af68c8a8e
parent9992b19d756ab8f0889fcaf3e71ff93852e74694
hwmon: (mcp3021) improve driver support for newer hwmon interface

This driver is currently broken, it does not show the in0_input sysfs
file and also returns the following message on startup:

hwmon_device_register() is deprecated. Please convert the driver to
use hwmon_device_register_with_info().

This patch converts the driver and also cleans up the 'read' function.

Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
Link: https://lore.kernel.org/r/20220712193504.1374656-1-ferlandm@amotus.ca
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/mcp3021.c