summaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/common.h
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-06-06 14:18:38 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-07 09:10:09 -0700
commit97664a207bc2601a03a300f00e6922038cd5b99c (patch)
tree19202c1dc78068e52a337cf34bff79d7c6e1b92f /drivers/usb/renesas_usbhs/common.h
parent8a2c225ddb2d23a9b3f70af2ec70d28e4abd0b8e (diff)
downloadblackbird-op-linux-97664a207bc2601a03a300f00e6922038cd5b99c.tar.gz
blackbird-op-linux-97664a207bc2601a03a300f00e6922038cd5b99c.zip
usb: renesas_usbhs: shrink spin lock area
spin lock was very effective while doing 1 packet send/recv on current renesas_usbhs driver. But this lock is enough only - modify packet/pipe link - modify interrpt mask - modify fifo access This patch shrink spin lock area Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/renesas_usbhs/common.h')
-rw-r--r--drivers/usb/renesas_usbhs/common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h
index 0aadcb402764..7bf675c23a5e 100644
--- a/drivers/usb/renesas_usbhs/common.h
+++ b/drivers/usb/renesas_usbhs/common.h
@@ -204,6 +204,10 @@ void usbhs_write(struct usbhs_priv *priv, u32 reg, u16 data);
void usbhs_bset(struct usbhs_priv *priv, u32 reg, u16 mask, u16 data);
int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev);
+
+#define usbhs_lock(p, f) spin_lock_irqsave(usbhs_priv_to_lock(p), f)
+#define usbhs_unlock(p, f) spin_unlock_irqrestore(usbhs_priv_to_lock(p), f)
+
/*
* sysconfig
*/
OpenPOWER on IntegriCloud