kernel_optimize_test/drivers/platform
Guenter Roeck 8e49773a75 MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon
[ Upstream commit abae018a03821be2b65c01ebe2bef06fd7d85a4c ]

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:21:19 +02:00
..
chrome platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls 2022-06-09 10:21:14 +02:00
goldfish mm, tree-wide: rename put_user_page*() to unpin_user_page*() 2020-01-31 10:30:38 -08:00
mellanox platform/mellanox: mlxreg-io: Fix read access of n-bytes size attributes 2021-10-20 11:45:05 +02:00
mips MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon 2022-06-09 10:21:19 +02:00
olpc Platform: OLPC: Fix probe error handling 2021-03-17 17:06:23 +01:00
x86 platform/x86: samsung-laptop: Fix an unsigned comparison which can never be negative 2022-04-27 13:53:53 +02:00
Kconfig
Makefile