Skip to content

Commit

Permalink
usb: musb: do not error out if Kconfig doesn't match board mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi committed Feb 17, 2011
1 parent 04b31c7 commit 75a14b1
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1949,31 +1949,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
goto fail0;
}

switch (plat->mode) {
case MUSB_HOST:
#ifdef CONFIG_USB_MUSB_HDRC_HCD
break;
#else
goto bad_config;
#endif
case MUSB_PERIPHERAL:
#ifdef CONFIG_USB_GADGET_MUSB_HDRC
break;
#else
goto bad_config;
#endif
case MUSB_OTG:
#ifdef CONFIG_USB_MUSB_OTG
break;
#else
bad_config:
#endif
default:
dev_err(dev, "incompatible Kconfig role setting\n");
status = -EINVAL;
goto fail0;
}

/* allocate */
musb = allocate_instance(dev, plat->config, ctrl);
if (!musb) {
Expand Down

0 comments on commit 75a14b1

Please sign in to comment.