diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-07-24 15:18:49 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-08-09 07:28:29 +0200 |
commit | 8484aa0cb36d8fd751db77e46763719c78a03b22 (patch) | |
tree | 8a0c1e7a6d87113a4d49274ac400a69a4158fe8a /drivers/usb/gadget | |
parent | usb: dwc2: Switch to use device_property_count_u32() (diff) | |
download | linux-8484aa0cb36d8fd751db77e46763719c78a03b22.tar.xz linux-8484aa0cb36d8fd751db77e46763719c78a03b22.zip |
usb: gadget: pch_udc: 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: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/udc/pch_udc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c index cded51f36fc1..265dab2bbfac 100644 --- a/drivers/usb/gadget/udc/pch_udc.c +++ b/drivers/usb/gadget/udc/pch_udc.c @@ -3046,8 +3046,7 @@ static void pch_udc_remove(struct pci_dev *pdev) #ifdef CONFIG_PM_SLEEP static int pch_udc_suspend(struct device *d) { - struct pci_dev *pdev = to_pci_dev(d); - struct pch_udc_dev *dev = pci_get_drvdata(pdev); + struct pch_udc_dev *dev = dev_get_drvdata(d); pch_udc_disable_interrupts(dev, UDC_DEVINT_MSK); pch_udc_disable_ep_interrupts(dev, UDC_EPINT_MSK_DISABLE_ALL); |