aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_core.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2011-02-16 05:27:54 -0500
committerFelipe Balbi <balbi@ti.com>2011-02-17 14:11:45 -0500
commit75a14b1434a0ca409bcc8ab9b6b2e680796c487e (patch)
tree18ceaa8e3ea4e442c4b087e5572dcc0f8be76120 /drivers/usb/musb/musb_core.c
parent04b31c776f34d127b422da92899272a0b8cda21d (diff)
usb: musb: do not error out if Kconfig doesn't match board mode
During development, even though board is wired to e.g. OTG, we might want to compile host-only or peripheral-only configurations. Let's allow that to happen. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r--drivers/usb/musb/musb_core.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 54a8bd1047d6..bc296557dc1b 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1949,31 +1949,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
1949 goto fail0; 1949 goto fail0;
1950 } 1950 }
1951 1951
1952 switch (plat->mode) {
1953 case MUSB_HOST:
1954#ifdef CONFIG_USB_MUSB_HDRC_HCD
1955 break;
1956#else
1957 goto bad_config;
1958#endif
1959 case MUSB_PERIPHERAL:
1960#ifdef CONFIG_USB_GADGET_MUSB_HDRC
1961 break;
1962#else
1963 goto bad_config;
1964#endif
1965 case MUSB_OTG:
1966#ifdef CONFIG_USB_MUSB_OTG
1967 break;
1968#else
1969bad_config:
1970#endif
1971 default:
1972 dev_err(dev, "incompatible Kconfig role setting\n");
1973 status = -EINVAL;
1974 goto fail0;
1975 }
1976
1977 /* allocate */ 1952 /* allocate */
1978 musb = allocate_instance(dev, plat->config, ctrl); 1953 musb = allocate_instance(dev, plat->config, ctrl);
1979 if (!musb) { 1954 if (!musb) {