On Mon, Dec 13, 2010 at 01:01:35AM +0800, tom.leiming@xxxxxxxxx wrote:
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index b9ea563..5843810 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -259,6 +259,7 @@ enum musb_g_ep0_state { * @exit: undoes @init * @set_mode: forcefully changes operating mode * @try_ilde: tries to idle the IP + * @get_hw_revision: get hardware revision * @vbus_status: returns vbus status if possible * @set_vbus: forces vbus status */ @@ -272,6 +273,8 @@ struct musb_platform_ops { int (*set_mode)(struct musb *musb, u8 mode); void (*try_idle)(struct musb *musb, unsigned long timeout); + u8 (*get_hw_revision)(struct musb *musb);
keep the alignment here.
diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index c061a88..7403bfd 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c @@ -696,7 +696,8 @@ dma_controller_create(struct musb *musb, void __iomem *base) tusb_dma->controller.channel_program = tusb_omap_dma_program; tusb_dma->controller.channel_abort = tusb_omap_dma_abort; - if (tusb_get_revision(musb) >= TUSB_REV_30) + if (musb->ops->get_hw_revision && + musb->ops->get_hw_revision(musb) >= TUSB_REV_30)
put a static inline on the header, don't access the point directly. Also, musb can have a generic get_hw_revision(). -- balbi -- 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