From: Chanwoo Choi Date: Tue, 8 Nov 2016 09:13:27 +0000 (+0900) Subject: PM / devfreq: rk3399_dmc: Use the resource-managed function to add devfreq dev X-Git-Tag: Ubuntu-5.13.0-19.19~14484^2^2~3^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=927b75a628b1d80fef171420fbd694fc28d9b8e9;p=mirror_ubuntu-jammy-kernel.git PM / devfreq: rk3399_dmc: Use the resource-managed function to add devfreq dev This patch uses the resource-managed to add the devfreq device. This function will make it easy to handle the devfreq device. - struct devfreq *devm_devfreq_add_device(struct device *dev, struct devfreq_dev_profile *profile, const char *governor_name, void *data); Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham --- diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c index 77bd9d02e870..5063ac1a5939 100644 --- a/drivers/devfreq/rk3399_dmc.c +++ b/drivers/devfreq/rk3399_dmc.c @@ -436,7 +436,7 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev) rk3399_devfreq_dmc_profile.initial_freq = data->rate; - data->devfreq = devfreq_add_device(dev, + data->devfreq = devm_devfreq_add_device(dev, &rk3399_devfreq_dmc_profile, "simple_ondemand", &data->ondemand_data);