* [PATCH] mtd: rawnand: r852: Use dev_get_drvdata
@ 2019-07-23 12:47 Chuhong Yuan
2019-08-07 16:17 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Chuhong Yuan @ 2019-07-23 12:47 UTC (permalink / raw)
Cc: Vignesh Raghavendra, Chuhong Yuan, linux-kernel, Marek Vasut,
linux-mtd, Miquel Raynal, Brian Norris, David Woodhouse,
Maxim Levitsky
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/mtd/nand/raw/r852.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/raw/r852.c b/drivers/mtd/nand/raw/r852.c
index dae0d235bb17..77774250fb11 100644
--- a/drivers/mtd/nand/raw/r852.c
+++ b/drivers/mtd/nand/raw/r852.c
@@ -998,7 +998,7 @@ static void r852_shutdown(struct pci_dev *pci_dev)
#ifdef CONFIG_PM_SLEEP
static int r852_suspend(struct device *device)
{
- struct r852_device *dev = pci_get_drvdata(to_pci_dev(device));
+ struct r852_device *dev = dev_get_drvdata(device);
if (dev->ctlreg & R852_CTL_CARDENABLE)
return -EBUSY;
@@ -1019,7 +1019,7 @@ static int r852_suspend(struct device *device)
static int r852_resume(struct device *device)
{
- struct r852_device *dev = pci_get_drvdata(to_pci_dev(device));
+ struct r852_device *dev = dev_get_drvdata(device);
r852_disable_irqs(dev);
r852_card_update_present(dev);
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: rawnand: r852: Use dev_get_drvdata
2019-07-23 12:47 [PATCH] mtd: rawnand: r852: Use dev_get_drvdata Chuhong Yuan
@ 2019-08-07 16:17 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2019-08-07 16:17 UTC (permalink / raw)
To: Chuhong Yuan
Cc: Vignesh Raghavendra, linux-kernel, Marek Vasut, linux-mtd,
Miquel Raynal, Brian Norris, David Woodhouse, Maxim Levitsky
On Tue, 2019-07-23 at 12:47:27 UTC, Chuhong Yuan 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 to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-07 16:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 12:47 [PATCH] mtd: rawnand: r852: Use dev_get_drvdata Chuhong Yuan
2019-08-07 16:17 ` Miquel Raynal
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).