Commit 77c2f02e authored by Paul Bolle's avatar Paul Bolle Committed by Tony Lindgren

ARM: OMAP: replace checks for CONFIG_USB_GADGET_OMAP

Commit 193ab2a6 ("usb: gadget: allow multiple gadgets to be built")
apparently required that checks for CONFIG_USB_GADGET_OMAP would be
replaced with checks for CONFIG_USB_OMAP. Do so now for the remaining
checks for CONFIG_USB_GADGET_OMAP, even though these checks have
basically been broken since v3.1.

And, since we're touching this code, use the IS_ENABLED() macro, so
things will now (hopefully) also work if USB_OMAP is modular.

Fixes: 193ab2a6 ("usb: gadget: allow multiple gadgets to be built")
Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 4513c3b8
...@@ -346,7 +346,7 @@ static struct omap_usb_config h2_usb_config __initdata = { ...@@ -346,7 +346,7 @@ static struct omap_usb_config h2_usb_config __initdata = {
/* usb1 has a Mini-AB port and external isp1301 transceiver */ /* usb1 has a Mini-AB port and external isp1301 transceiver */
.otg = 2, .otg = 2,
#ifdef CONFIG_USB_GADGET_OMAP #if IS_ENABLED(CONFIG_USB_OMAP)
.hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */ .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */
/* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */ /* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */
#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) #elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
......
...@@ -366,7 +366,7 @@ static struct omap_usb_config h3_usb_config __initdata = { ...@@ -366,7 +366,7 @@ static struct omap_usb_config h3_usb_config __initdata = {
/* usb1 has a Mini-AB port and external isp1301 transceiver */ /* usb1 has a Mini-AB port and external isp1301 transceiver */
.otg = 2, .otg = 2,
#ifdef CONFIG_USB_GADGET_OMAP #if IS_ENABLED(CONFIG_USB_OMAP)
.hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */ .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */
#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) #elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
/* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */ /* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */
......
...@@ -312,7 +312,7 @@ static struct omap_usb_config h2_usb_config __initdata = { ...@@ -312,7 +312,7 @@ static struct omap_usb_config h2_usb_config __initdata = {
/* usb1 has a Mini-AB port and external isp1301 transceiver */ /* usb1 has a Mini-AB port and external isp1301 transceiver */
.otg = 2, .otg = 2,
#ifdef CONFIG_USB_GADGET_OMAP #if IS_ENABLED(CONFIG_USB_OMAP)
.hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */ .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */
/* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */ /* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */
#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) #elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
......
...@@ -283,7 +283,7 @@ static struct omap_usb_config osk_usb_config __initdata = { ...@@ -283,7 +283,7 @@ static struct omap_usb_config osk_usb_config __initdata = {
* be used, with a NONSTANDARD gender-bending cable/dongle, as * be used, with a NONSTANDARD gender-bending cable/dongle, as
* a peripheral. * a peripheral.
*/ */
#ifdef CONFIG_USB_GADGET_OMAP #if IS_ENABLED(CONFIG_USB_OMAP)
.register_dev = 1, .register_dev = 1,
.hmc_mode = 0, .hmc_mode = 0,
#else #else
......
...@@ -1295,7 +1295,7 @@ isp1301_set_host(struct usb_otg *otg, struct usb_bus *host) ...@@ -1295,7 +1295,7 @@ isp1301_set_host(struct usb_otg *otg, struct usb_bus *host)
return isp1301_otg_enable(isp); return isp1301_otg_enable(isp);
return 0; return 0;
#elif !defined(CONFIG_USB_GADGET_OMAP) #elif !IS_ENABLED(CONFIG_USB_OMAP)
// FIXME update its refcount // FIXME update its refcount
otg->host = host; otg->host = host;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment