Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 374f4bfd authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

USB: isp1362: remove _DBG() usage



If you want a debug call, just make it, so move to using the
already-there DBG() call.  No need to make things more complex than they
really need to be.

Acked-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2809508d
Loading
Loading
Loading
Loading
+15 −15
Original line number Original line Diff line number Diff line
@@ -1573,12 +1573,12 @@ static int isp1362_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
		DBG(0, "ClearHubFeature: ");
		DBG(0, "ClearHubFeature: ");
		switch (wValue) {
		switch (wValue) {
		case C_HUB_OVER_CURRENT:
		case C_HUB_OVER_CURRENT:
			_DBG(0, "C_HUB_OVER_CURRENT\n");
			DBG(0, "C_HUB_OVER_CURRENT\n");
			spin_lock_irqsave(&isp1362_hcd->lock, flags);
			spin_lock_irqsave(&isp1362_hcd->lock, flags);
			isp1362_write_reg32(isp1362_hcd, HCRHSTATUS, RH_HS_OCIC);
			isp1362_write_reg32(isp1362_hcd, HCRHSTATUS, RH_HS_OCIC);
			spin_unlock_irqrestore(&isp1362_hcd->lock, flags);
			spin_unlock_irqrestore(&isp1362_hcd->lock, flags);
		case C_HUB_LOCAL_POWER:
		case C_HUB_LOCAL_POWER:
			_DBG(0, "C_HUB_LOCAL_POWER\n");
			DBG(0, "C_HUB_LOCAL_POWER\n");
			break;
			break;
		default:
		default:
			goto error;
			goto error;
@@ -1589,7 +1589,7 @@ static int isp1362_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
		switch (wValue) {
		switch (wValue) {
		case C_HUB_OVER_CURRENT:
		case C_HUB_OVER_CURRENT:
		case C_HUB_LOCAL_POWER:
		case C_HUB_LOCAL_POWER:
			_DBG(0, "C_HUB_OVER_CURRENT or C_HUB_LOCAL_POWER\n");
			DBG(0, "C_HUB_OVER_CURRENT or C_HUB_LOCAL_POWER\n");
			break;
			break;
		default:
		default:
			goto error;
			goto error;
@@ -1620,36 +1620,36 @@ static int isp1362_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,


		switch (wValue) {
		switch (wValue) {
		case USB_PORT_FEAT_ENABLE:
		case USB_PORT_FEAT_ENABLE:
			_DBG(0, "USB_PORT_FEAT_ENABLE\n");
			DBG(0, "USB_PORT_FEAT_ENABLE\n");
			tmp = RH_PS_CCS;
			tmp = RH_PS_CCS;
			break;
			break;
		case USB_PORT_FEAT_C_ENABLE:
		case USB_PORT_FEAT_C_ENABLE:
			_DBG(0, "USB_PORT_FEAT_C_ENABLE\n");
			DBG(0, "USB_PORT_FEAT_C_ENABLE\n");
			tmp = RH_PS_PESC;
			tmp = RH_PS_PESC;
			break;
			break;
		case USB_PORT_FEAT_SUSPEND:
		case USB_PORT_FEAT_SUSPEND:
			_DBG(0, "USB_PORT_FEAT_SUSPEND\n");
			DBG(0, "USB_PORT_FEAT_SUSPEND\n");
			tmp = RH_PS_POCI;
			tmp = RH_PS_POCI;
			break;
			break;
		case USB_PORT_FEAT_C_SUSPEND:
		case USB_PORT_FEAT_C_SUSPEND:
			_DBG(0, "USB_PORT_FEAT_C_SUSPEND\n");
			DBG(0, "USB_PORT_FEAT_C_SUSPEND\n");
			tmp = RH_PS_PSSC;
			tmp = RH_PS_PSSC;
			break;
			break;
		case USB_PORT_FEAT_POWER:
		case USB_PORT_FEAT_POWER:
			_DBG(0, "USB_PORT_FEAT_POWER\n");
			DBG(0, "USB_PORT_FEAT_POWER\n");
			tmp = RH_PS_LSDA;
			tmp = RH_PS_LSDA;


			break;
			break;
		case USB_PORT_FEAT_C_CONNECTION:
		case USB_PORT_FEAT_C_CONNECTION:
			_DBG(0, "USB_PORT_FEAT_C_CONNECTION\n");
			DBG(0, "USB_PORT_FEAT_C_CONNECTION\n");
			tmp = RH_PS_CSC;
			tmp = RH_PS_CSC;
			break;
			break;
		case USB_PORT_FEAT_C_OVER_CURRENT:
		case USB_PORT_FEAT_C_OVER_CURRENT:
			_DBG(0, "USB_PORT_FEAT_C_OVER_CURRENT\n");
			DBG(0, "USB_PORT_FEAT_C_OVER_CURRENT\n");
			tmp = RH_PS_OCIC;
			tmp = RH_PS_OCIC;
			break;
			break;
		case USB_PORT_FEAT_C_RESET:
		case USB_PORT_FEAT_C_RESET:
			_DBG(0, "USB_PORT_FEAT_C_RESET\n");
			DBG(0, "USB_PORT_FEAT_C_RESET\n");
			tmp = RH_PS_PRSC;
			tmp = RH_PS_PRSC;
			break;
			break;
		default:
		default:
@@ -1669,7 +1669,7 @@ static int isp1362_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
		wIndex--;
		wIndex--;
		switch (wValue) {
		switch (wValue) {
		case USB_PORT_FEAT_SUSPEND:
		case USB_PORT_FEAT_SUSPEND:
			_DBG(0, "USB_PORT_FEAT_SUSPEND\n");
			DBG(0, "USB_PORT_FEAT_SUSPEND\n");
			spin_lock_irqsave(&isp1362_hcd->lock, flags);
			spin_lock_irqsave(&isp1362_hcd->lock, flags);
			isp1362_write_reg32(isp1362_hcd, HCRHPORT1 + wIndex, RH_PS_PSS);
			isp1362_write_reg32(isp1362_hcd, HCRHPORT1 + wIndex, RH_PS_PSS);
			isp1362_hcd->rhport[wIndex] =
			isp1362_hcd->rhport[wIndex] =
@@ -1677,7 +1677,7 @@ static int isp1362_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
			spin_unlock_irqrestore(&isp1362_hcd->lock, flags);
			spin_unlock_irqrestore(&isp1362_hcd->lock, flags);
			break;
			break;
		case USB_PORT_FEAT_POWER:
		case USB_PORT_FEAT_POWER:
			_DBG(0, "USB_PORT_FEAT_POWER\n");
			DBG(0, "USB_PORT_FEAT_POWER\n");
			spin_lock_irqsave(&isp1362_hcd->lock, flags);
			spin_lock_irqsave(&isp1362_hcd->lock, flags);
			isp1362_write_reg32(isp1362_hcd, HCRHPORT1 + wIndex, RH_PS_PPS);
			isp1362_write_reg32(isp1362_hcd, HCRHPORT1 + wIndex, RH_PS_PPS);
			isp1362_hcd->rhport[wIndex] =
			isp1362_hcd->rhport[wIndex] =
@@ -1685,7 +1685,7 @@ static int isp1362_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
			spin_unlock_irqrestore(&isp1362_hcd->lock, flags);
			spin_unlock_irqrestore(&isp1362_hcd->lock, flags);
			break;
			break;
		case USB_PORT_FEAT_RESET:
		case USB_PORT_FEAT_RESET:
			_DBG(0, "USB_PORT_FEAT_RESET\n");
			DBG(0, "USB_PORT_FEAT_RESET\n");
			spin_lock_irqsave(&isp1362_hcd->lock, flags);
			spin_lock_irqsave(&isp1362_hcd->lock, flags);


			t1 = jiffies + msecs_to_jiffies(USB_RESET_WIDTH);
			t1 = jiffies + msecs_to_jiffies(USB_RESET_WIDTH);
@@ -1719,7 +1719,7 @@ static int isp1362_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
	default:
	default:
 error:
 error:
		/* "protocol stall" on error */
		/* "protocol stall" on error */
		_DBG(0, "PROTOCOL STALL\n");
		DBG(0, "PROTOCOL STALL\n");
		retval = -EPIPE;
		retval = -EPIPE;
	}
	}


+0 −6
Original line number Original line Diff line number Diff line
@@ -588,14 +588,8 @@ static inline struct usb_hcd *isp1362_hcd_to_hcd(struct isp1362_hcd *isp1362_hcd
		if (dbg_level > level) \
		if (dbg_level > level) \
			pr_debug(fmt); \
			pr_debug(fmt); \
	} while (0)
	} while (0)
#define _DBG(level, fmt...)	\
	do { \
		if (dbg_level > level) \
			printk(fmt); \
	} while (0)
#else
#else
#define DBG(fmt...)		do {} while (0)
#define DBG(fmt...)		do {} while (0)
#define _DBG DBG
#endif
#endif


#ifdef VERBOSE
#ifdef VERBOSE