mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 17:54:13 +08:00
mtd: rawnand: r852: Use dev_get_drvdata
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> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
parent
3194166052
commit
75de0eb28d
@ -998,7 +998,7 @@ static void r852_shutdown(struct pci_dev *pci_dev)
|
|||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
static int r852_suspend(struct device *device)
|
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)
|
if (dev->ctlreg & R852_CTL_CARDENABLE)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
@ -1019,7 +1019,7 @@ static int r852_suspend(struct device *device)
|
|||||||
|
|
||||||
static int r852_resume(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_disable_irqs(dev);
|
||||||
r852_card_update_present(dev);
|
r852_card_update_present(dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user