Re: [PATCH] usb: dwc3: omap: remove unnecessary lock

2013-12-09 Thread Santosh Shilimkar
On Saturday 07 December 2013 12:55 PM, Balbi, Felipe wrote:
> the lock was only taken inside the hardirq
> handler, which runs with IRQs disabled. There's
> no chance of any race condition happening, even
> on SMP machines. It's safe to remove that
> spinlock.
> 
> Signed-off-by: Felipe Balbi 
> ---
Acked-by: Santosh Shilimkar 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] usb: dwc3: omap: remove unnecessary lock

2013-12-07 Thread Felipe Balbi
the lock was only taken inside the hardirq
handler, which runs with IRQs disabled. There's
no chance of any race condition happening, even
on SMP machines. It's safe to remove that
spinlock.

Signed-off-by: Felipe Balbi 
---
 drivers/usb/dwc3/dwc3-omap.c | 10 --
 1 file changed, 10 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index daab0ad..b269dbd 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -120,9 +119,6 @@
 #define USBOTGSS_UTMI_OTG_STATUS_VBUSVALID (1 << 1)
 
 struct dwc3_omap {
-   /* device lock */
-   spinlock_t  lock;
-
struct device   *dev;
 
int irq;
@@ -280,8 +276,6 @@ static irqreturn_t dwc3_omap_interrupt(int irq, void *_omap)
struct dwc3_omap*omap = _omap;
u32 reg;
 
-   spin_lock(&omap->lock);
-
reg = dwc3_omap_read_irqmisc_status(omap);
 
if (reg & USBOTGSS_IRQMISC_DMADISABLECLR) {
@@ -322,8 +316,6 @@ static irqreturn_t dwc3_omap_interrupt(int irq, void *_omap)
 
dwc3_omap_write_irq0_status(omap, reg);
 
-   spin_unlock(&omap->lock);
-
return IRQ_HANDLED;
 }
 
@@ -449,8 +441,6 @@ static int dwc3_omap_probe(struct platform_device *pdev)
}
}
 
-   spin_lock_init(&omap->lock);
-
omap->dev   = dev;
omap->irq   = irq;
omap->base  = base;
-- 
1.8.4.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html