aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-dwc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pwm/pwm-dwc.c')
-rw-r--r--drivers/pwm/pwm-dwc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c
index a4a057ae03ea..9a1b156ead26 100644
--- a/drivers/pwm/pwm-dwc.c
+++ b/drivers/pwm/pwm-dwc.c
@@ -73,8 +73,7 @@ static void dwc_pwm_remove(struct pci_dev *pci)
static int dwc_pwm_suspend(struct device *dev)
{
- struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
- struct dwc_pwm *dwc = pci_get_drvdata(pdev);
+ struct dwc_pwm *dwc = dev_get_drvdata(dev);
int i;
for (i = 0; i < DWC_TIMERS_TOTAL; i++) {
@@ -93,8 +92,7 @@ static int dwc_pwm_suspend(struct device *dev)
static int dwc_pwm_resume(struct device *dev)
{
- struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
- struct dwc_pwm *dwc = pci_get_drvdata(pdev);
+ struct dwc_pwm *dwc = dev_get_drvdata(dev);
int i;
for (i = 0; i < DWC_TIMERS_TOTAL; i++) {