Commit 3ee35fd1 authored by Raag Jadav's avatar Raag Jadav Committed by Uwe Kleine-König

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: default avatarRaag Jadav <raag.jadav@intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240212130247.9985-6-raag.jadav@intel.comSigned-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
parent 0fa319a1
......@@ -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++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment