linux-stable/drivers/platform/mips
Guenter Roeck abae018a03 MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon
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>
2022-05-12 17:58:05 +02:00
..
cpu_hwmon.c MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon 2022-05-12 17:58:05 +02:00
Kconfig MIPS: Loongson64: Add Loongson-2K1000 reset platform driver 2022-01-02 14:13:09 +01:00
ls2k-reset.c MIPS: Loongson64: Add missing of_node_put() in ls2k_reset_init() 2022-01-05 09:53:45 +01:00
Makefile MIPS: Loongson64: Add Loongson-2K1000 reset platform driver 2022-01-02 14:13:09 +01:00
rs780e-acpi.c MIPS: Loongson64: Make acpi_registers_setup() static 2020-07-08 11:30:10 +02:00