linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Subhash Jadavani <subhashj@codeaurora.org>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: myungjoo.ham@samsung.com, kyungmin.park@samsung.com,
	rjw@rjwysocki.net, cpgs@samsung.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Vinayak Holikatti <vinholikatti@gmail.com>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 2/2] scsi: ufs: Use the resource-managed function to add devfreq device
Date: Tue, 08 Nov 2016 12:40:57 -0800	[thread overview]
Message-ID: <153efd17adaed2dd87d03acbd80ad89b@codeaurora.org> (raw)
In-Reply-To: <1478596619-3064-1-git-send-email-cw00.choi@samsung.com>

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

  reply	other threads:[~2016-11-08 20:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1478596408-2958-1-git-send-email-cw00.choi@samsung.com>
2016-11-08  9:13 ` [PATCH v2 2/2] scsi: ufs: Use the resource-managed function to add devfreq device Chanwoo Choi
2016-11-09  0:17   ` Martin K. Petersen
2016-11-08  9:16 ` Chanwoo Choi
2016-11-08 20:40   ` Subhash Jadavani [this message]
     [not found] ` <CGME20161108091702epcas5p4779c47d7341e22697e7e49dd2f91ae0b@epcas5p4.samsung.com>
2016-11-09  1:26   ` MyungJoo Ham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=153efd17adaed2dd87d03acbd80ad89b@codeaurora.org \
    --to=subhashj@codeaurora.org \
    --cc=cpgs@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=rjw@rjwysocki.net \
    --cc=vinholikatti@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).