usb: musb: make all glue layer export struct musb_platform_ops

preparing to a big refactor on musb code. We need
to be able to compile in all glue layers (or at
least all ARM-based ones) together and have a
working binary.

While preparing for that, we move every glue
layer to export only one symbol, which is
a struct musb_platform_ops, and make all
other functions static.

Later patches will come to allow for compiling
all glue layers together and have a working
binary.

Signed-off-by: Felipe Balbi <balbi@ti.com>
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 27dabcf..5f0d0f1 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -35,7 +35,6 @@
 #include "musb_core.h"
 #include "omap2430.h"
 
-
 static struct timer_list musb_idle_timer;
 
 static void musb_do_idle(unsigned long _musb)
@@ -98,7 +97,7 @@
 }
 
 
-void musb_platform_try_idle(struct musb *musb, unsigned long timeout)
+static void omap2430_musb_try_idle(struct musb *musb, unsigned long timeout)
 {
 	unsigned long		default_timeout = jiffies + msecs_to_jiffies(3);
 	static unsigned long	last_timer;
@@ -131,13 +130,15 @@
 	mod_timer(&musb_idle_timer, timeout);
 }
 
-void musb_platform_enable(struct musb *musb)
+static void omap2430_musb_enable(struct musb *musb)
 {
 }
-void musb_platform_disable(struct musb *musb)
+
+static void omap2430_musb_disable(struct musb *musb)
 {
 }
-static void omap_set_vbus(struct musb *musb, int is_on)
+
+static void omap2430_musb_set_vbus(struct musb *musb, int is_on)
 {
 	u8		devctl;
 	/* HDRC controls CPEN, but beware current surges during device
@@ -175,9 +176,9 @@
 		musb_readb(musb->mregs, MUSB_DEVCTL));
 }
 
-static int musb_platform_resume(struct musb *musb);
+static int omap2430_musb_resume(struct musb *musb);
 
-int musb_platform_set_mode(struct musb *musb, u8 musb_mode)
+static int omap2430_musb_set_mode(struct musb *musb, u8 musb_mode)
 {
 	u8	devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
 
@@ -187,7 +188,7 @@
 	return 0;
 }
 
-int __init musb_platform_init(struct musb *musb)
+static int omap2430_musb_init(struct musb *musb)
 {
 	u32 l;
 	struct device *dev = musb->controller;
@@ -204,7 +205,7 @@
 		return -ENODEV;
 	}
 
-	musb_platform_resume(musb);
+	omap2430_musb_resume(musb);
 
 	l = musb_readl(musb->mregs, OTG_SYSCONFIG);
 	l &= ~ENABLEWAKEUP;	/* disable wakeup */
@@ -242,7 +243,7 @@
 			musb_readl(musb->mregs, OTG_SIMENABLE));
 
 	if (is_host_enabled(musb))
-		musb->board_set_vbus = omap_set_vbus;
+		musb->board_set_vbus = omap2430_musb_set_vbus;
 
 	setup_timer(&musb_idle_timer, musb_do_idle, (unsigned long) musb);
 
@@ -265,7 +266,7 @@
 }
 #endif
 
-static int musb_platform_suspend(struct musb *musb)
+static int omap2430_musb_suspend(struct musb *musb)
 {
 	u32 l;
 
@@ -291,7 +292,7 @@
 	return 0;
 }
 
-static int musb_platform_resume(struct musb *musb)
+static int omap2430_musb_resume(struct musb *musb)
 {
 	u32 l;
 
@@ -316,12 +317,27 @@
 	return 0;
 }
 
-
-int musb_platform_exit(struct musb *musb)
+static int omap2430_musb_exit(struct musb *musb)
 {
 
-	musb_platform_suspend(musb);
+	omap2430_musb_suspend(musb);
 
 	otg_put_transceiver(musb->xceiv);
 	return 0;
 }
+
+const struct musb_platform_ops musb_ops = {
+	.init		= omap2430_musb_init,
+	.exit		= omap2430_musb_exit,
+
+	.suspend	= omap2430_musb_suspend,
+	.resume		= omap2430_musb_resume,
+
+	.enable		= omap2430_musb_enable,
+	.disable	= omap2430_musb_disable,
+
+	.set_mode	= omap2430_musb_set_mode,
+	.try_idle	= omap2430_musb_try_idle,
+
+	.set_vbus	= omap2430_musb_set_vbus,
+};