linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>,
	Alex Dubov <oakad@yahoo.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] memstick: r592: Use dev_get_drvdata
Date: Wed, 24 Jul 2019 16:08:23 +0200	[thread overview]
Message-ID: <CAPDyKFpThB0Ktyp5a=ZrLST=VvztbGEvdHr1HHzouOa23+nN0w@mail.gmail.com> (raw)
In-Reply-To: <20190723115044.18591-1-hslester96@gmail.com>

On Tue, 23 Jul 2019 at 13:50, Chuhong Yuan <hslester96@gmail.com> wrote:
>
> Instead of using to_pci_dev + pci_get_drvdata,
> use dev_get_drvdata to make code simpler.
>
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>

Applied for next, thanks!

Kind regards
Uffe

> ---
>  drivers/memstick/host/r592.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c
> index 2932f421b3ea..dd3a1f3dcc19 100644
> --- a/drivers/memstick/host/r592.c
> +++ b/drivers/memstick/host/r592.c
> @@ -847,8 +847,7 @@ static void r592_remove(struct pci_dev *pdev)
>  #ifdef CONFIG_PM_SLEEP
>  static int r592_suspend(struct device *core_dev)
>  {
> -       struct pci_dev *pdev = to_pci_dev(core_dev);
> -       struct r592_device *dev = pci_get_drvdata(pdev);
> +       struct r592_device *dev = dev_get_drvdata(core_dev);
>
>         r592_clear_interrupts(dev);
>         memstick_suspend_host(dev->host);
> @@ -858,8 +857,7 @@ static int r592_suspend(struct device *core_dev)
>
>  static int r592_resume(struct device *core_dev)
>  {
> -       struct pci_dev *pdev = to_pci_dev(core_dev);
> -       struct r592_device *dev = pci_get_drvdata(pdev);
> +       struct r592_device *dev = dev_get_drvdata(core_dev);
>
>         r592_clear_interrupts(dev);
>         r592_enable_device(dev, false);
> --
> 2.20.1
>

      reply	other threads:[~2019-07-24 14:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 11:50 [PATCH] memstick: r592: Use dev_get_drvdata Chuhong Yuan
2019-07-24 14:08 ` Ulf Hansson [this message]

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='CAPDyKFpThB0Ktyp5a=ZrLST=VvztbGEvdHr1HHzouOa23+nN0w@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=hslester96@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    --cc=oakad@yahoo.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).