]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
PM / devfreq: rk3399_dmc: Use the resource-managed function to add devfreq dev
authorChanwoo Choi <cw00.choi@samsung.com>
Tue, 8 Nov 2016 09:13:27 +0000 (18:13 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 17 Nov 2016 02:31:29 +0000 (11:31 +0900)
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 <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/rk3399_dmc.c

index 77bd9d02e870547831f8f8750df93fb678898b0b..5063ac1a59391fe2bb44753f95e12d6032a18c05 100644 (file)
@@ -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);