Skip to content

Commit

Permalink
dma: intel_mid_dma: remove redundant pci_set_drvdata calls
Browse files Browse the repository at this point in the history
Call pci_set_drvdata() once in intel_mid_dma_probe() is enough.
Remove redundant pci_set_drvdata() calls in dma_suspend() and dma_resume().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Axel Lin authored and Vinod Koul committed Jul 26, 2011
1 parent 2a9778e commit add56ba
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/dma/intel_mid_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,6 @@ int dma_suspend(struct pci_dev *pci, pm_message_t state)
return -EAGAIN;
}
device->state = SUSPENDED;
pci_set_drvdata(pci, device);
pci_save_state(pci);
pci_disable_device(pci);
pci_set_power_state(pci, PCI_D3hot);
Expand Down Expand Up @@ -1380,7 +1379,6 @@ int dma_resume(struct pci_dev *pci)
}
device->state = RUNNING;
iowrite32(REG_BIT0, device->dma_base + DMA_CFG);
pci_set_drvdata(pci, device);
return 0;
}

Expand Down

0 comments on commit add56ba

Please sign in to comment.