OSDN Git Service

hwmon: (i5500_temp) Convert to devm_hwmon_device_register_with_info
authorArmin Wolf <W_Armin@gmx.de>
Mon, 23 Aug 2021 17:07:24 +0000 (19:07 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 12 Oct 2021 14:22:37 +0000 (07:22 -0700)
commit6665e10a2ec3cadfe026d4f28a2e3193fe392035
treec7e94b854bb3b6d392b3d6c31651c050594b9e1c
parentfb4747d89b4866402fc2230022d59fa60e9e0cd5
hwmon: (i5500_temp) Convert to devm_hwmon_device_register_with_info

Use devm_hwmon_device_register_with_info() to simplify code
and use register defines instead of hardcoded values.
Also use the BIT() macro for the alarms.

Only compile-tested.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20210823170724.7662-1-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/i5500_temp.c