ARM: OMAP: replace checks for CONFIG_USB_GADGET_OMAP
Subsystems (5)
PATCH 1/1 ARM: OMAP: replace checks for CONFIG_USB_GADGET_OMAP
Commit 193ab2a60700 ("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.
---
Also untested.
It seems efficient to also include the change to phy-isp1301-omap.c in this patch (ie, not ship that as a separate patch).
arch/arm/mach-omap1/board-h2.c | 2 +- arch/arm/mach-omap1/board-h3.c | 2 +- arch/arm/mach-omap1/board-innovator.c | 2 +- arch/arm/mach-omap1/board-osk.c | 2 +- drivers/usb/phy/phy-isp1301-omap.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-omap1/board-h2.c +1 -1
@@ -346,7 +346,7 @@ static struct omap_usb_config h2_usb_config __initdata = {/* usb1 has a Mini-AB port and external isp1301 transceiver */ .otg = 2, -#ifdef CONFIG_USB_GADGET_OMAP +#ifdef CONFIG_USB_OMAP .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled *//* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */ #elif defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE )
arch/arm/mach-omap1/board-h3.c +1 -1
@@ -366,7 +366,7 @@ static struct omap_usb_config h3_usb_config __initdata = {/* usb1 has a Mini-AB port and external isp1301 transceiver */ .otg = 2, -#ifdef CONFIG_USB_GADGET_OMAP +#ifdef CONFIG_USB_OMAP .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */#elif defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE )/* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */
arch/arm/mach-omap1/board-innovator.c +1 -1
@@ -312,7 +312,7 @@ static struct omap_usb_config h2_usb_config __initdata = {/* usb1 has a Mini-AB port and external isp1301 transceiver */ .otg = 2, -#ifdef CONFIG_USB_GADGET_OMAP +#ifdef CONFIG_USB_OMAP .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled *//* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */ #elif defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE )
arch/arm/mach-omap1/board-osk.c +1 -1
@@ -283,7 +283,7 @@ static struct omap_usb_config osk_usb_config __initdata = {* be used, with a NONSTANDARD gender-bending cable/dongle, as * a peripheral. */ -#ifdef CONFIG_USB_GADGET_OMAP +#ifdef CONFIG_USB_OMAP .register_dev = 1, .hmc_mode = 0,#else
drivers/usb/phy/phy-isp1301-omap.c +1 -1
@@ -1295,7 +1295,7 @@ isp1301_set_host(struct usb_otg *otg, struct usb_bus *host)return isp1301_otg_enable (isp);return 0 ; -#elif !defined(CONFIG_USB_GADGET_OMAP ) +#elif !defined(CONFIG_USB_OMAP )// FIXME update its refcount otg->host = host;
Signature · 1 line
1.9.0
Quoted 26 lines · Paul Bolle
Commit
193ab2a60700("usb: gadget: allow multiple gadgets to be built") apparently required that checks forCONFIG_USB_GADGET_OMAPwould be replaced with checks forCONFIG_USB_OMAP. Do so now for the remaining checks forCONFIG_USB_GADGET_OMAP, even though these checks have basically been broken since v3.1.Fixes 193ab2a60700 ("usb: gadget: allow multiple gadgets to be built")Signed-off-by Paul Bolle <[email protected]>---
Also untested.It seems efficient to also include the change to
phy-isp1301-omap.cin this patch (ie, not ship that as a separate patch).arch/arm/mach-omap1/board-h2.c | 2 +- arch/arm/mach-omap1/board-h3.c | 2 +- arch/arm/mach-omap1/board-innovator.c | 2 +- arch/arm/mach-omap1/board-osk.c | 2 +- drivers/usb/phy/phy-isp1301-omap.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)arch/arm/mach-omap1/board-h2.c +0
-0
arch/arm/mach-omap1/board-h2.c static struct omap_usb_config h2_usb_config __initdata = { · line 349
Quoted 5 lines
arch/arm/mach-omap1/board-h2.c +1
-1@@ -346,7 +346,7 @@ static struct omap_usb_config h2_usb_config __initdata = {/* usb1 has a Mini-AB port and external isp1301 transceiver */ .otg = 2, -#ifdef CONFIG_USB_GADGET_OMAP +#ifdef CONFIG_USB_OMAP
CONFIG_USB_OMAP is tristate, it might be better to use IS_ENABLED(CONFIG_USB_OMAP) here. Likewise for the rest of the patch.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140515/c7af7322/attachment.sig>
Felipe,
Quoted 9 lines · Felipe Balbi
Quoted 8 lines · Paul Bolle
arch/arm/mach-omap1/board-h2.c +0
-0@@ -346,7 +346,7 @@ static struct omap_usb_config h2_usb_config __initdata = {/* usb1 has a Mini-AB port and external isp1301 transceiver */ .otg = 2,
Quoted 5 lines
arch/arm/mach-omap1/board-h2.c static struct omap_usb_config h2_usb_config __initdata = { · line 349
Quoted 2 lines
arch/arm/mach-omap1/board-h2.c +1
-1-#ifdef CONFIG_USB_GADGET_OMAP +#ifdef CONFIG_USB_OMAP
CONFIG_USB_OMAPis tristate, it might be better to useIS_ENABLED(CONFIG_USB_OMAP)here. Likewise for the rest of the patch.
Will do shortly. That does increase the scope of the patch, a bit, but since this code has been effectively dead since v3.1 that is hardly an additional risk.
Thanks!
Paul Bolle
PATCH v2 1/1 ARM: OMAP: replace checks for CONFIG_USB_GADGET_OMAP
Commit 193ab2a60700 ("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.
---
v2: us IS_ENABLED() as Felipe requested. Still untested.
arch/arm/mach-omap1/board-h2.c | 2 +- arch/arm/mach-omap1/board-h3.c | 2 +- arch/arm/mach-omap1/board-innovator.c | 2 +- arch/arm/mach-omap1/board-osk.c | 2 +- drivers/usb/phy/phy-isp1301-omap.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-omap1/board-h2.c +1 -1
@@ -346,7 +346,7 @@ static struct omap_usb_config h2_usb_config __initdata = {/* usb1 has a Mini-AB port and external isp1301 transceiver */ .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 = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */ #elif defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE )
arch/arm/mach-omap1/board-h3.c +1 -1
@@ -366,7 +366,7 @@ static struct omap_usb_config h3_usb_config __initdata = {/* usb1 has a Mini-AB port and external isp1301 transceiver */ .otg = 2, -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP ) .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */#elif defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE )/* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */
arch/arm/mach-omap1/board-innovator.c +1 -1
@@ -312,7 +312,7 @@ static struct omap_usb_config h2_usb_config __initdata = {/* usb1 has a Mini-AB port and external isp1301 transceiver */ .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 = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */ #elif defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE )
arch/arm/mach-omap1/board-osk.c +1 -1
@@ -283,7 +283,7 @@ static struct omap_usb_config osk_usb_config __initdata = {* be used, with a NONSTANDARD gender-bending cable/dongle, as * a peripheral. */ -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP ) .register_dev = 1, .hmc_mode = 0,#else
drivers/usb/phy/phy-isp1301-omap.c +1 -1
@@ -1295,7 +1295,7 @@ isp1301_set_host(struct usb_otg *otg, struct usb_bus *host)return isp1301_otg_enable (isp);return 0 ; -#elif !defined(CONFIG_USB_GADGET_OMAP ) +#elif !IS_ENABLED (CONFIG_USB_OMAP )// FIXME update its refcount otg->host = host;
Signature · 1 line
1.9.0
Tony Lindgren
reviewerQuoted 6 lines · Paul Bolle
Commit
193ab2a60700("usb: gadget: allow multiple gadgets to be built") apparently required that checks forCONFIG_USB_GADGET_OMAPwould be replaced with checks forCONFIG_USB_OMAP. Do so now for the remaining checks forCONFIG_USB_GADGET_OMAP, even though these checks have basically been broken since v3.1.
Quoted 7 lines
And, since we're touching this code, use the
IS_ENABLED()macro, so things will now (hopefully) also work ifUSB_OMAPis modular.Fixes 193ab2a60700 ("usb: gadget: allow multiple gadgets to be built")Signed-off-by Paul Bolle <[email protected]>---
v2: usIS_ENABLED()as Felipe requested. Still untested.
Thanks applying into omap-for-v3.16/board.
Tony