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);
Conflicts:
drivers/devfreq/rk3399_dmc.c
Change-Id: I2ba2779a1b944931dc240f0593824f0316d11985
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit
927b75a628b1d80fef171420fbd694fc28d9b8e9)
data->volt = regulator_get_voltage(data->vdd_center);
devp->initial_freq = data->rate;
- data->devfreq = devfreq_add_device(dev, devp,
+ data->devfreq = devm_devfreq_add_device(dev, devp,
"simple_ondemand",
&data->ondemand_data);
if (IS_ERR(data->devfreq))