In s32cc thermal driver, the current used hwmon_device_register_with_info() API, is not suitable for s32cc anymore, due to the commit ddaefa209c4a ("hwmon: Make chip parameter for with_info API mandatory"), or else, there will be probe error when load the driver.
And for thermal subsystem, commit e5d21072054f ("hwmon: Introduce hwmon_device_register_for_thermal") introduced a new API, so update the driver to use the new hwmon_device_register_for_thermal() API to fix the probe issue. Signed-off-by: Zhantao Tang <zhantao.t...@windriver.com> --- drivers/thermal/s32cc_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/s32cc_thermal.c b/drivers/thermal/s32cc_thermal.c index c8ea449990d4..6a544a6fce23 100644 --- a/drivers/thermal/s32cc_thermal.c +++ b/drivers/thermal/s32cc_thermal.c @@ -499,8 +499,7 @@ static int tmu_probe(struct platform_device *pd) tmu_init_hw(dev, tmu_chip); tmu_dd->hwmon_device = - hwmon_device_register_with_info(dev, DRIVER_NAME, - tmu_dd, NULL, NULL); + hwmon_device_register_for_thermal(dev, DRIVER_NAME, tmu_dd); if (IS_ERR(tmu_dd->hwmon_device)) { ret = PTR_ERR(tmu_dd->hwmon_device); dev_err(dev, "Cannot register hwmon device: %d\n", ret); -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12643): https://lists.yoctoproject.org/g/linux-yocto/message/12643 Mute This Topic: https://lists.yoctoproject.org/mt/99081984/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-