Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1517570

Re: [PATCH v2 2/2] scsi: ufs: Use the resource-managed function to add devfreq device

From Subhash Jadavani <subhashj@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/2] scsi: ufs: Use the resource-managed function to add devfreq device
Date 2016-11-08 21:50 +0100
Message-ID <sBlvb-5XM-9@gated-at.bofh.it> (permalink)
References <sBaJr-7rN-7@gated-at.bofh.it> <sBaJs-7rN-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2016-11-08 01:16, Chanwoo Choi wrote:
> 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: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>  drivers/scsi/ufs/ufshcd.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index e491c4bda32f..e8c5ba274830 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -6250,8 +6250,6 @@ void ufshcd_remove(struct ufs_hba *hba)
>  	ufshcd_hba_stop(hba, true);
> 
>  	ufshcd_exit_clk_gating(hba);
> -	if (ufshcd_is_clkscaling_enabled(hba))
> -		devfreq_remove_device(hba->devfreq);
>  	ufshcd_hba_exit(hba);
>  }
>  EXPORT_SYMBOL_GPL(ufshcd_remove);
> @@ -6579,7 +6577,7 @@ int ufshcd_init(struct ufs_hba *hba, void
> __iomem *mmio_base, unsigned int irq)
>  	}
> 
>  	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);
>  		if (IS_ERR(hba->devfreq)) {
>  			dev_err(hba->dev, "Unable to register with devfreq %ld\n",

LGTM.
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>

-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] PM / devfreq: Use the resource-managed function for  devfreq device Chanwoo Choi <cw00.choi@samsung.com> - 2016-11-08 10:20 +0100
  [PATCH v2 1/2] PM / devfreq: rk3399_dmc: Use the resource-managed  function to add devfreq dev Chanwoo Choi <cw00.choi@samsung.com> - 2016-11-08 10:20 +0100
  [PATCH v2 2/2] scsi: ufs: Use the resource-managed function to add  devfreq device Chanwoo Choi <cw00.choi@samsung.com> - 2016-11-08 10:20 +0100
    Re: [PATCH v2 2/2] scsi: ufs: Use the resource-managed function to add devfreq device "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-11-09 01:20 +0100
  [PATCH v2 2/2] scsi: ufs: Use the resource-managed function to add  devfreq device Chanwoo Choi <cw00.choi@samsung.com> - 2016-11-08 10:20 +0100
    Re: [PATCH v2 2/2] scsi: ufs: Use the resource-managed function to  add devfreq device Subhash Jadavani <subhashj@codeaurora.org> - 2016-11-08 21:50 +0100
  RE: [PATCH v2 2/2] scsi: ufs: Use the resource-managed function to add devfreq device MyungJoo Ham <myungjoo.ham@samsung.com> - 2016-11-09 02:30 +0100
  RE: [PATCH v2 1/2] PM / devfreq: rk3399_dmc: Use the resource-managed function to add devfreq dev MyungJoo Ham <myungjoo.ham@samsung.com> - 2016-11-09 02:30 +0100

csiph-web