diff options
author | Raag Jadav <raag.jadav@intel.com> | 2024-02-08 08:05:28 +0100 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2024-02-15 12:29:20 +0100 |
commit | 3ee35fd12b018e15ed540c921ce0bbb6254f4c2a (patch) | |
tree | f9c4349077a3fcda19087de0353166e90809b6ce /drivers/pwm/pwm-dwc.c | |
parent | dt-bindings: atmel,hlcdc: convert pwm bindings to json-schema (diff) | |
download | linux-3ee35fd12b018e15ed540c921ce0bbb6254f4c2a.tar.xz linux-3ee35fd12b018e15ed540c921ce0bbb6254f4c2a.zip |
pwm: dwc: access driver_data using dev_get_drvdata()
Now that we're setting driver_data using dev_set_drvdata(), we can use
dev_get_drvdata() for accessing it.
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240212130247.9985-6-raag.jadav@intel.com
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'drivers/pwm/pwm-dwc.c')
-rw-r--r-- | drivers/pwm/pwm-dwc.c | 6 |
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++) { |