提交 4861ee15 编写于 作者: C Chanwoo Choi 提交者: Martin K. Petersen

scsi: ufs: Use the resource-managed function to add devfreq device

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);
Cc: Vinayak Holikatti <vinholikatti@gmail.com>
Cc: James E.J. Bottomley <jejb@linux.vnet.ibm.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 d0799621
...@@ -6250,8 +6250,6 @@ void ufshcd_remove(struct ufs_hba *hba) ...@@ -6250,8 +6250,6 @@ void ufshcd_remove(struct ufs_hba *hba)
ufshcd_hba_stop(hba, true); ufshcd_hba_stop(hba, true);
ufshcd_exit_clk_gating(hba); ufshcd_exit_clk_gating(hba);
if (ufshcd_is_clkscaling_enabled(hba))
devfreq_remove_device(hba->devfreq);
ufshcd_hba_exit(hba); ufshcd_hba_exit(hba);
} }
EXPORT_SYMBOL_GPL(ufshcd_remove); EXPORT_SYMBOL_GPL(ufshcd_remove);
...@@ -6579,7 +6577,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) ...@@ -6579,7 +6577,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
} }
if (ufshcd_is_clkscaling_enabled(hba)) { if (ufshcd_is_clkscaling_enabled(hba)) {
hba->devfreq = devfreq_add_device(dev, &ufs_devfreq_profile, hba->devfreq = devm_devfreq_add_device(dev, &ufs_devfreq_profile,
"simple_ondemand", NULL); "simple_ondemand", NULL);
if (IS_ERR(hba->devfreq)) { if (IS_ERR(hba->devfreq)) {
dev_err(hba->dev, "Unable to register with devfreq %ld\n", dev_err(hba->dev, "Unable to register with devfreq %ld\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册