From: Chuhong Yuan <hslester96@gmail.com> To: unlisted-recipients:; (no To-header on input) Cc: Maxim Levitsky <maximlevitsky@gmail.com>, Alex Dubov <oakad@yahoo.com>, Ulf Hansson <ulf.hansson@linaro.org>, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan <hslester96@gmail.com> Subject: [PATCH] memstick: r592: Use dev_get_drvdata Date: Tue, 23 Jul 2019 19:50:44 +0800 [thread overview] Message-ID: <20190723115044.18591-1-hslester96@gmail.com> (raw) 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> --- 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
WARNING: multiple messages have this Message-ID (diff)
From: Chuhong Yuan <hslester96@gmail.com> Cc: Maxim Levitsky <maximlevitsky@gmail.com>, Alex Dubov <oakad@yahoo.com>, Ulf Hansson <ulf.hansson@linaro.org>, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan <hslester96@gmail.com> Subject: [PATCH] memstick: r592: Use dev_get_drvdata Date: Tue, 23 Jul 2019 19:50:44 +0800 [thread overview] Message-ID: <20190723115044.18591-1-hslester96@gmail.com> (raw) 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> --- 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
next reply other threads:[~2019-07-23 11:50 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-23 11:50 Chuhong Yuan [this message] 2019-07-23 11:50 ` [PATCH] memstick: r592: Use dev_get_drvdata Chuhong Yuan 2019-07-24 14:08 ` Ulf Hansson
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=20190723115044.18591-1-hslester96@gmail.com \ --to=hslester96@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mmc@vger.kernel.org \ --cc=maximlevitsky@gmail.com \ --cc=oakad@yahoo.com \ --cc=ulf.hansson@linaro.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.