diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2014-05-20 18:30:11 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-06-30 12:33:35 -0500 |
commit | e56e69cc0ff4905914695f20c927aa71597be94c (patch) | |
tree | 755a4d0a2b8ba83d780e75a326ab75887d65fce8 /drivers/usb/gadget/net2280.h | |
parent | ae8e530a7e5d87592cb23996bee7fd6f1eb202ed (diff) |
usb: gadget: net2280: Use pr_* function
Driver was using custom functions WARNING, ERROR, DEBUG, instead of
pr_err, pr_dgb...
New ep_* macros have been created that use standard pr_* functions.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/net2280.h')
-rw-r--r-- | drivers/usb/gadget/net2280.h | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/drivers/usb/gadget/net2280.h b/drivers/usb/gadget/net2280.h index 77c39d9f6d8a..dc9ca1d5dc8e 100644 --- a/drivers/usb/gadget/net2280.h +++ b/drivers/usb/gadget/net2280.h @@ -314,32 +314,20 @@ static inline void net2280_led_shutdown(struct net2280 *dev) /*-------------------------------------------------------------------------*/ -#define xprintk(dev, level, fmt, args...) \ - printk(level "%s %s: " fmt, driver_name, \ - pci_name(dev->pdev), ## args) +#define ep_dbg(ndev, fmt, args...) \ + dev_dbg((&((ndev)->pdev->dev)), fmt, ##args) -#ifdef DEBUG -#undef DEBUG -#define DEBUG(dev, fmt, args...) \ - xprintk(dev, KERN_DEBUG, fmt, ## args) -#else -#define DEBUG(dev, fmt, args...) \ - do { } while (0) -#endif /* DEBUG*/ +#define ep_vdbg(ndev, fmt, args...) \ + dev_vdbg((&((ndev)->pdev->dev)), fmt, ##args) -#ifdef VERBOSE -#define VDEBUG DEBUG -#else -#define VDEBUG(dev, fmt, args...) \ - do { } while (0) -#endif /* VERBOSE */ +#define ep_info(ndev, fmt, args...) \ + dev_info((&((ndev)->pdev->dev)), fmt, ##args) + +#define ep_warn(ndev, fmt, args...) \ + dev_warn((&((ndev)->pdev->dev)), fmt, ##args) -#define ERROR(dev, fmt, args...) \ - xprintk(dev, KERN_ERR, fmt, ## args) -#define WARNING(dev, fmt, args...) \ - xprintk(dev, KERN_WARNING, fmt, ## args) -#define INFO(dev, fmt, args...) \ - xprintk(dev, KERN_INFO, fmt, ## args) +#define ep_err(ndev, fmt, args...) \ + dev_err((&((ndev)->pdev->dev)), fmt, ##args) /*-------------------------------------------------------------------------*/ @@ -368,7 +356,7 @@ static inline void assert_out_naking(struct net2280_ep *ep, const char *where) u32 tmp = readl(&ep->regs->ep_stat); if ((tmp & BIT(NAK_OUT_PACKETS)) == 0) { - DEBUG(ep->dev, "%s %s %08x !NAK\n", + ep_dbg(ep->dev, "%s %s %08x !NAK\n", ep->ep.name, where, tmp); writel(BIT(SET_NAK_OUT_PACKETS), &ep->regs->ep_rsp); |