aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-10-24 05:25:48 -0400
committerFelipe Balbi <balbi@ti.com>2011-12-12 04:44:59 -0500
commitb4fcea2a71cafc59a749fa3ef88e51af8c2e3b37 (patch)
treeef0ab84ad857413cb35e3633dda19538e3841934
parentf1ee56a0004c4a5974e7a69665330b6ff818bf92 (diff)
usb: gadget: renesas_usbhs: unified callback function
renesas_usbhs needs callback for notify hotplug. but it were 2 methods which are almost same. This patch unified these into one. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/renesas_usbhs/common.c2
-rw-r--r--drivers/usb/renesas_usbhs/common.h2
-rw-r--r--drivers/usb/renesas_usbhs/mod.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 17bf1f74377a..0fea6b63ccce 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -385,7 +385,7 @@ static void usbhsc_notify_hotplug(struct work_struct *work)
385 usbhsc_hotplug(priv); 385 usbhsc_hotplug(priv);
386} 386}
387 387
388int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev) 388static int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev)
389{ 389{
390 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev); 390 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
391 int delay = usbhs_get_dparam(priv, detection_delay); 391 int delay = usbhs_get_dparam(priv, detection_delay);
diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h
index 3199d3799045..e255015072a6 100644
--- a/drivers/usb/renesas_usbhs/common.h
+++ b/drivers/usb/renesas_usbhs/common.h
@@ -275,8 +275,6 @@ u16 usbhs_read(struct usbhs_priv *priv, u32 reg);
275void usbhs_write(struct usbhs_priv *priv, u32 reg, u16 data); 275void usbhs_write(struct usbhs_priv *priv, u32 reg, u16 data);
276void usbhs_bset(struct usbhs_priv *priv, u32 reg, u16 mask, u16 data); 276void usbhs_bset(struct usbhs_priv *priv, u32 reg, u16 mask, u16 data);
277 277
278int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev);
279
280#define usbhs_lock(p, f) spin_lock_irqsave(usbhs_priv_to_lock(p), f) 278#define usbhs_lock(p, f) spin_lock_irqsave(usbhs_priv_to_lock(p), f)
281#define usbhs_unlock(p, f) spin_unlock_irqrestore(usbhs_priv_to_lock(p), f) 279#define usbhs_unlock(p, f) spin_unlock_irqrestore(usbhs_priv_to_lock(p), f)
282 280
diff --git a/drivers/usb/renesas_usbhs/mod.c b/drivers/usb/renesas_usbhs/mod.c
index 053f86d70009..f382e4314362 100644
--- a/drivers/usb/renesas_usbhs/mod.c
+++ b/drivers/usb/renesas_usbhs/mod.c
@@ -50,7 +50,9 @@ static int usbhsm_autonomy_irq_vbus(struct usbhs_priv *priv,
50{ 50{
51 struct platform_device *pdev = usbhs_priv_to_pdev(priv); 51 struct platform_device *pdev = usbhs_priv_to_pdev(priv);
52 52
53 return usbhsc_drvcllbck_notify_hotplug(pdev); 53 renesas_usbhs_call_notify_hotplug(pdev);
54
55 return 0;
54} 56}
55 57
56void usbhs_mod_autonomy_mode(struct usbhs_priv *priv) 58void usbhs_mod_autonomy_mode(struct usbhs_priv *priv)