lkml.org 
[lkml]   [2022]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] MIPS: Loongson: Use hwmon_device_register_with_groups() to register hwmon
On Wed, May 11, 2022 at 07:56:59AM -0700, Guenter Roeck wrote:
> 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: f59dc5119192 ("MIPS: Loongson: Fix boot warning about hwmon_device_register()")
> Cc: Zhi Li <lizhi01@loongson.cn>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/platform/mips/cpu_hwmon.c | 127 ++++++++++--------------------
> 1 file changed, 41 insertions(+), 86 deletions(-)

applied to mips-next.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]

\
 
 \ /
  Last update: 2022-05-12 18:12    [W:0.055 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site