Re: [PATCH] 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]

 



Dear Guente-san,

Thanks for your comment!
In __hwmon_device_register() function of hwmon.c, we have assigned 'dev' directly to 'hdev->parent'. Formerly, when registering the hwmon device, we pass NULL as the device. This is not affected. Recently, the developer has replaced the parameter NULL as the device by the actual device.
Do you know the commit ID of this recent change?
It's useful for review of your change, and to know to which versions your
patch should be backported.

The commit ID of this recent change is"f6b6b52 thermal_hwmon: Pass the originating device down to hwmon_device_register_with_info".

If thermal doesn't want hwmon to use the thermal zone device, it should pass
the parent of that device as parameter.

I will see the feedback from Marc-san.

This causes the "No sensors found" error. This patch is to fix this error.
On which platform do you see this failure?
Thanks again!

This error is found on Gen2 Lager board v4.19-rc2 by RVC team.


Some more details about the error would be useful.

Below are some information about confirm the error:

- Before the commit "f6b6b52ef7a54160c0a4d2b56a58f84a2e5b33c5" (pass NULL as the device):
"root@linaro-nano:~# sensors
 cpu_thermal-virtual-0
 Adapter: Virtual device
 temp1:        +30.0�°C  (crit = +95.0�°C)

 root@linaro-nano:~# "


- After the commit "f6b6b52ef7a54160c0a4d2b56a58f84a2e5b33c5" (pass the actual device):
"root@linaro-nano:~# sensors
 No sensors found!
 Make sure you loaded all the kernel drivers you need.
 Try sensors-detect to find out which these are.
 root@linaro-nano:~#"


- At my patch (change dev to dev->parent):
"root@linaro-nano:~# sensors
 cpu_thermal-virtual-0
 Adapter: Virtual device
 temp1:        +30.0�°C  (crit = +95.0�°C)

 root@linaro-nano:~#"


Regards,
Dong/Jinso





[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