diff options
author | Raviteja Garimella <raviteja.garimella@broadcom.com> | 2017-05-10 15:51:18 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-06-13 13:21:01 +0300 |
commit | 498beb42814e3f734ea6d376a4854c7e0b6060a8 (patch) | |
tree | 5fe27abd24c4ab2397f6153f8925dec15d7ff44e /drivers/usb/gadget/udc/amd5536udc.h | |
parent | a676fb62b15b8fdb3a3dce9679863195d50bdd06 (diff) | |
download | linux-498beb42814e3f734ea6d376a4854c7e0b6060a8.tar.xz |
usb: gadget: udc: make debug prints compatible with both pci and platform devices
This patch adds a struct device member to UDC data structure and
makes changes to the arguments of dev_err and dev_dbg calls so that
the debug prints work for both pci and platform devices.
Signed-off-by: Raviteja Garimella <raviteja.garimella@broadcom.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/udc/amd5536udc.h')
-rw-r--r-- | drivers/usb/gadget/udc/amd5536udc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/amd5536udc.h b/drivers/usb/gadget/udc/amd5536udc.h index fae49bf3833e..91aae23b7370 100644 --- a/drivers/usb/gadget/udc/amd5536udc.h +++ b/drivers/usb/gadget/udc/amd5536udc.h @@ -563,6 +563,8 @@ struct udc { u16 cur_config; u16 cur_intf; u16 cur_alt; + + struct device *dev; }; #define to_amd5536_udc(g) (container_of((g), struct udc, gadget)) @@ -639,7 +641,7 @@ MODULE_PARM_DESC(use_fullspeed, "true for fullspeed only"); /* debug macros ------------------------------------------------------------*/ -#define DBG(udc , args...) dev_dbg(&(udc)->pdev->dev, args) +#define DBG(udc , args...) dev_dbg(udc->dev, args) #ifdef UDC_VERBOSE #define VDBG DBG |