Commit e56e69cc authored by Ricardo Ribalda Delgado's avatar Ricardo Ribalda Delgado Committed by Felipe Balbi

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: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent ae8e530a
This diff is collapsed.
...@@ -314,32 +314,20 @@ static inline void net2280_led_shutdown(struct net2280 *dev) ...@@ -314,32 +314,20 @@ static inline void net2280_led_shutdown(struct net2280 *dev)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
#define xprintk(dev, level, fmt, args...) \ #define ep_dbg(ndev, fmt, args...) \
printk(level "%s %s: " fmt, driver_name, \ dev_dbg((&((ndev)->pdev->dev)), fmt, ##args)
pci_name(dev->pdev), ## args)
#ifdef DEBUG #define ep_vdbg(ndev, fmt, args...) \
#undef DEBUG dev_vdbg((&((ndev)->pdev->dev)), fmt, ##args)
#define DEBUG(dev, fmt, args...) \
xprintk(dev, KERN_DEBUG, fmt, ## args)
#else
#define DEBUG(dev, fmt, args...) \
do { } while (0)
#endif /* DEBUG*/
#ifdef VERBOSE #define ep_info(ndev, fmt, args...) \
#define VDEBUG DEBUG dev_info((&((ndev)->pdev->dev)), fmt, ##args)
#else
#define VDEBUG(dev, fmt, args...) \ #define ep_warn(ndev, fmt, args...) \
do { } while (0) dev_warn((&((ndev)->pdev->dev)), fmt, ##args)
#endif /* VERBOSE */
#define ERROR(dev, fmt, args...) \ #define ep_err(ndev, fmt, args...) \
xprintk(dev, KERN_ERR, fmt, ## args) dev_err((&((ndev)->pdev->dev)), fmt, ##args)
#define WARNING(dev, fmt, args...) \
xprintk(dev, KERN_WARNING, fmt, ## args)
#define INFO(dev, fmt, args...) \
xprintk(dev, KERN_INFO, fmt, ## args)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
...@@ -368,7 +356,7 @@ static inline void assert_out_naking(struct net2280_ep *ep, const char *where) ...@@ -368,7 +356,7 @@ static inline void assert_out_naking(struct net2280_ep *ep, const char *where)
u32 tmp = readl(&ep->regs->ep_stat); u32 tmp = readl(&ep->regs->ep_stat);
if ((tmp & BIT(NAK_OUT_PACKETS)) == 0) { 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); ep->ep.name, where, tmp);
writel(BIT(SET_NAK_OUT_PACKETS), writel(BIT(SET_NAK_OUT_PACKETS),
&ep->regs->ep_rsp); &ep->regs->ep_rsp);
......
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