Re: [PATCH v2] thermal_hwmon: Fix the 'No sensors found' error after replacing the parameter NULL by the actual device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CC Eduardo, Enric, Günter,

On Wed, Oct 3, 2018 at 9:27 AM Cao Van Dong <cv-dong@xxxxxxxxxxx> wrote:
> Formerly, when registering the hwmon device, we pass NULL as the device. It's not a problem.
> Recently, the developer has replaced the parameter NULL as the device by the actual device.
> This causes the "No sensors found" error. Therefore, instead of using the device we will use pass
> the parent of that device as parameter. This will sync with the processor on the hwmon core.
> This patch is to fix this error.
>
> This patch is based on the v4.19-rc3 tag.

Fixes: f6b6b52ef7a54160 ("thermal_hwmon: Pass the originating device
down to hwmon_device_register_with_info")

> --- a/drivers/thermal/thermal_hwmon.c
> +++ b/drivers/thermal/thermal_hwmon.c
> @@ -143,7 +143,7 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
>         INIT_LIST_HEAD(&hwmon->tz_list);
>         strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
>         strreplace(hwmon->type, '-', '_');
> -       hwmon->device = hwmon_device_register_with_info(&tz->device, hwmon->type,
> +       hwmon->device = hwmon_device_register_with_info(tz->device.parent, hwmon->type,
>                                                         hwmon, NULL, NULL);
>         if (IS_ERR(hwmon->device)) {
>                 result = PTR_ERR(hwmon->device);

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux