[Letux-kernel] about [ 4.861297] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
H. Nikolaus Schaller
hns at goldelico.com
Mon Apr 17 20:20:08 CEST 2017
> Am 17.04.2017 um 18:46 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>
> Hi,
> during boot I have seen 3 such messages and did research a little (by adding dump_stack() to drivers/hwmon/hwmon.c to see where it really comes from).
>
> There was a patch for fixing it:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/thermal/thermal_hwmon.c?id=7611fb68062f8d7f416f3272894d1edf7bbff29c
>
> but later it was reverted because it is said to make N900 problems:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/thermal/thermal_hwmon.c?id=3feb479cea37fc623cf4e705631b2e679cbfbd7a
>
> But I haven't seen another fix proposed for it...
> And after applying the first patch I haven't seen any problem...
Ok, here is a new problem:
[ 13.130249] (NULL device *): hwmon: 'generic-adc-batt' is not a valid name attribute, please fix
[ 17.108276] (NULL device *): hwmon: 'bq27000-battery' is not a valid name attribute, please fix
So this means that hwmon does not accept the name attribute and we may be missing the bq27000 temperature hwmon interface (which we do not use AFAIK).
Indeed there is a check:
http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/hwmon/hwmon.c;h=5a7684fa7ec47b0812881bee3e73ba38b7638c60;hb=refs/heads/letux-4.11-rc7#l547
The question is why '-' and '*' are not valid characters for names?
https://www.mjmwired.net/kernel/Documentation/hwmon/hwmon-kernel-api.txt#20
does not mention any restrictions for the name...
BR,
Nikolaus
More information about the Letux-kernel
mailing list