[PATCH] usb: musb: Fix glue_to_musb macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix the glue_to_musb macro when CONFIG_USB_MUSB_HDRC_HCD is defined.

Signed-off-by: Hema HK <hemahk@xxxxxx>
Cc: Felipe Balbi <balbi@xxxxxx>
---
 drivers/usb/musb/am35x.c    |    5 +++++
 drivers/usb/musb/blackfin.c |    5 +++++
 drivers/usb/musb/omap2430.c |    5 +++++
 drivers/usb/musb/ux500.c    |    7 ++++++-
 4 files changed, 21 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/usb/musb/am35x.c
===================================================================
--- linux-2.6.orig/drivers/usb/musb/am35x.c
+++ linux-2.6/drivers/usb/musb/am35x.c
@@ -87,7 +87,12 @@ struct am35x_glue {
 	struct clk		*phy_clk;
 	struct clk		*clk;
 };
+
+#ifdef CONFIG_USB_MUSB_HDRC_HCD
+#define glue_to_musb(g)		hcd_to_musb(platform_get_drvdata(g->musb))
+#else
 #define glue_to_musb(g)		platform_get_drvdata(g->musb)
+#endif
 
 /*
  * am35x_musb_enable - enable interrupts
Index: linux-2.6/drivers/usb/musb/blackfin.c
===================================================================
--- linux-2.6.orig/drivers/usb/musb/blackfin.c
+++ linux-2.6/drivers/usb/musb/blackfin.c
@@ -27,7 +27,12 @@ struct bfin_glue {
 	struct device		*dev;
 	struct platform_device	*musb;
 };
+
+#ifdef CONFIG_USB_MUSB_HDRC_HCD
+#define glue_to_musb(g)		hcd_to_musb(platform_get_drvdata(g->musb))
+#else
 #define glue_to_musb(g)		platform_get_drvdata(g->musb)
+#endif
 
 /*
  * Load an endpoint's FIFO
Index: linux-2.6/drivers/usb/musb/omap2430.c
===================================================================
--- linux-2.6.orig/drivers/usb/musb/omap2430.c
+++ linux-2.6/drivers/usb/musb/omap2430.c
@@ -42,7 +42,12 @@ struct omap2430_glue {
 	struct platform_device	*musb;
 	struct clk		*clk;
 };
+
+#ifdef CONFIG_USB_MUSB_HDRC_HCD
+#define glue_to_musb(g)		hcd_to_musb(platform_get_drvdata(g->musb))
+#else
 #define glue_to_musb(g)		platform_get_drvdata(g->musb)
+#endif
 
 static struct timer_list musb_idle_timer;
 
Index: linux-2.6/drivers/usb/musb/ux500.c
===================================================================
--- linux-2.6.orig/drivers/usb/musb/ux500.c
+++ linux-2.6/drivers/usb/musb/ux500.c
@@ -33,7 +33,12 @@ struct ux500_glue {
 	struct platform_device	*musb;
 	struct clk		*clk;
 };
-#define glue_to_musb(g)	platform_get_drvdata(g->musb)
+
+#ifdef CONFIG_USB_MUSB_HDRC_HCD
+#define glue_to_musb(g)		hcd_to_musb(platform_get_drvdata(g->musb))
+#else
+#define glue_to_musb(g)		platform_get_drvdata(g->musb)
+#endif
 
 static int ux500_musb_init(struct musb *musb)
 {
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux