linux-stable/drivers/platform
Guenter Roeck affa0002e1 MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon
[ Upstream commit abae018a03 ]

Calling hwmon_device_register_with_info() with NULL dev and/or chip
information parameters is an ABI abuse and not a real conversion to
the new API. Also, the code creates sysfs attributes _after_ creating
the hwmon device, which is racy and unsupported to start with. On top
of that, the removal code tries to remove the name attribute which is
owned by the hwmon core.

Use hwmon_device_register_with_groups() to register the hwmon device
instead.

In the future, the hwmon subsystem will reject calls to
hwmon_device_register_with_info with NULL dev or chip/info parameters.
Without this patch, the hwmon device will fail to register.

Fixes: f59dc51191 ("MIPS: Loongson: Fix boot warning about hwmon_device_register()")
Cc: Zhi Li <lizhi01@loongson.cn>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:26:12 +02:00
..
chrome platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls 2022-06-09 10:26:01 +02:00
goldfish platform/goldfish: Convert pipe tasklet to threaded irq 2021-01-27 14:57:06 +01:00
mellanox platform/mellanox: mlxbf-pmc: Fix an IS_ERR() vs NULL bug in mlxbf_pmc_map_counters 2021-12-21 19:35:22 +01:00
mips MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon 2022-06-09 10:26:12 +02:00
olpc Platform: OLPC: Constify static struct regulator_ops 2021-02-08 16:59:21 +01:00
surface platform/surface: gpe: Add support for Surface Pro 8 2022-05-25 09:59:14 +02:00
x86 platform/x86: intel-hid: fix _DSM function index handling 2022-06-09 10:25:15 +02:00
Kconfig platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00
Makefile platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00