USB: OHCI: make ohci-nxp a separate driver
Subsystems (3)
PATCH 1/1 USB: OHCI: make ohci-nxp a separate driver
Separate the OHCI NXP host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Many place function name and struct name started with usb, current scenario replaced usb with ohci for proper naming.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 15 ------ drivers/usb/host/ohci-nxp.c | 124 +++++++++++++++++-------------------------- 4 files changed, 58 insertions(+), 90 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -398,6 +398,14 @@ config USB_OHCI_HCD_S3CXXXX Enables support for the on-chip OHCI controller on S3CXXXX chips. +config USB_OHCI_HCD_LPC32XX + tristate "Support for LPC on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_LPC32XX + default y + ---help--- + Enables support for the on-chip OHCI controller on + NXP chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -52,6 +52,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o +obj-$(CONFIG_USB_OHCI_HCD_LPC32XX) += ohci-nxp.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -15
@@ -1194,11 +1194,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_LPC32XX -#include "ohci-nxp.c" -#define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver -#endif -#ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" #define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver
@@ -1301,12 +1296,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef NXP_PLATFORM_DRIVER - retval =platform_driver_register (&NXP_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_nxp; -#endif -#ifdef DAVINCI_PLATFORM_DRIVER retval =platform_driver_register (&DAVINCI_PLATFORM_DRIVER );if (retval <0 )
@@ -1320,10 +1309,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); - error_nxp: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
drivers/usb/host/ohci-nxp.c +49 -75
196 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH 1/1 USB: OHCI: make ohci-nxp a separate driver
Quoted 37 lines · Manjunath Goudar
Separate the OHCI NXP host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Many place function name and struct name started with usb, current scenario replaced usb with ohci for proper naming.
drivers/usb/host/ohci-hcd.c +0
-11@@ -1194,11 +1194,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_LPC32XX -#include "ohci-nxp.c" -#define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver -#endif -#ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" #define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver@@ -1301,12 +1296,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef NXP_PLATFORM_DRIVER - retval =platform_driver_register (&NXP_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_nxp; -#endif -#ifdef DAVINCI_PLATFORM_DRIVER retval =platform_driver_register (&DAVINCI_PLATFORM_DRIVER );if (retval <0 )
drivers/usb/host/ohci-hcd.c static int __init ohci_hcd_mod_init(void) · line 1314
Quoted 10 lines
drivers/usb/host/ohci-hcd.c +0
-4@@ -1320,10 +1309,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); - error_nxp: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
You forgot to remove
#ifdef NXP_PLATFORM_DRIVER platform_driver_unregister(&NXP_PLATFORM_DRIVER);
#endif
from ohci_hcd_mod_exit(). The rest is okay.
Alan Stern
PATCH v2 1/1 USB: OHCI: make ohci-nxp a separate driver
In reply to Manjunath GoudarSeparate the OHCI NXP host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Many place function name and struct name started with usb, current scenario replaced usb with ohci for proper naming.
V2:
- Directive check NXP_PLATFORM_DRIVER block has been removed.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-nxp.c | 124 +++++++++++++++++-------------------------- 4 files changed, 58 insertions(+), 93 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -398,6 +398,14 @@ config USB_OHCI_HCD_S3CXXXX Enables support for the on-chip OHCI controller on S3CXXXX chips. +config USB_OHCI_HCD_LPC32XX + tristate "Support for LPC on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_LPC32XX + default y + ---help--- + Enables support for the on-chip OHCI controller on + NXP chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -52,6 +52,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o +obj-$(CONFIG_USB_OHCI_HCD_LPC32XX) += ohci-nxp.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1194,11 +1194,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_LPC32XX -#include "ohci-nxp.c" -#define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver -#endif -#ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" #define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver
@@ -1301,12 +1296,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef NXP_PLATFORM_DRIVER - retval =platform_driver_register (&NXP_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_nxp; -#endif -#ifdef DAVINCI_PLATFORM_DRIVER retval =platform_driver_register (&DAVINCI_PLATFORM_DRIVER );if (retval <0 )
@@ -1320,10 +1309,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); - error_nxp: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1368,9 +1353,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-nxp.c +49 -75
196 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Alan Stern
maintainerPATCH v2 1/1 USB: OHCI: make ohci-nxp a separate driver
Quoted 7 lines · Manjunath Goudar
Separate the OHCI NXP host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Many place function name and struct name started with usb, current scenario replaced usb with ohci for proper naming.
Quoted 8 lines
Signed-off-by Manjunath Goudar <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Alan Stern <[email protected]>Cc Greg KH <[email protected]>Cc linux-usb at vger.kernel.orgV2:
- Directive checkNXP_PLATFORM_DRIVERblock has been removed.
PATCH v2 1/1 USB: OHCI: make ohci-nxp a separate driver
In reply to Manjunath GoudarSeparate the OHCI NXP host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Many place function name and struct name started with usb, current scenario replaced usb with ohci for proper naming.
V2:
- Directive check NXP_PLATFORM_DRIVER block has been removed.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-nxp.c | 124 +++++++++++++++++-------------------------- 4 files changed, 58 insertions(+), 93 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -398,6 +398,14 @@ config USB_OHCI_HCD_S3CXXXX Enables support for the on-chip OHCI controller on S3CXXXX chips. +config USB_OHCI_HCD_LPC32XX + tristate "Support for LPC on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_LPC32XX + default y + ---help--- + Enables support for the on-chip OHCI controller on + NXP chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -52,6 +52,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o +obj-$(CONFIG_USB_OHCI_HCD_LPC32XX) += ohci-nxp.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1194,11 +1194,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_LPC32XX -#include "ohci-nxp.c" -#define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver -#endif -#ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" #define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver
@@ -1301,12 +1296,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef NXP_PLATFORM_DRIVER - retval =platform_driver_register (&NXP_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_nxp; -#endif -#ifdef DAVINCI_PLATFORM_DRIVER retval =platform_driver_register (&DAVINCI_PLATFORM_DRIVER );if (retval <0 )
@@ -1320,10 +1309,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); - error_nxp: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1368,9 +1353,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-nxp.c +49 -75
196 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 1/1 USB: OHCI: make ohci-nxp a separate driver
In reply to Manjunath GoudarSeparate the OHCI NXP host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Many place function name and struct name started with usb, current scenario replaced usb with ohci for proper naming.
V2:
- Directive check NXP_PLATFORM_DRIVER block has been removed.
--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-nxp.c | 124 +++++++++++++++++-------------------------- 4 files changed, 58 insertions(+), 93 deletions(-)
drivers/usb/host/Kconfig +8 -0
@@ -398,6 +398,14 @@ config USB_OHCI_HCD_S3CXXXX Enables support for the on-chip OHCI controller on S3CXXXX chips. +config USB_OHCI_HCD_LPC32XX + tristate "Support for LPC on-chip OHCI USB controller" + depends on USB_OHCI_HCD && ARCH_LPC32XX + default y + ---help--- + Enables support for the on-chip OHCI controller on + NXP chips. + config USB_OHCI_HCD_AT91 tristate "Support for Atmel on-chip OHCI USB controller" depends on USB_OHCI_HCD && ARCH_AT91
drivers/usb/host/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_USB_OHCI_HCD_OMAP3) += ohci-omap3.o obj-$(CONFIG_USB_OHCI_HCD_SPEAR) += ohci-spear.o obj-$(CONFIG_USB_OHCI_HCD_AT91) += ohci-at91.o obj-$(CONFIG_USB_OHCI_HCD_S3CXXXX) += ohci-s3c2410.o +obj-$(CONFIG_USB_OHCI_HCD_LPC32XX) += ohci-nxp.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
drivers/usb/host/ohci-hcd.c +0 -18
@@ -1194,11 +1194,6 @@ MODULE_LICENSE ("GPL");#define EP93XX_PLATFORM_DRIVER ohci_hcd_ep93xx_driver#endif -#ifdef CONFIG_ARCH_LPC32XX -#include "ohci-nxp.c" -#define NXP_PLATFORM_DRIVER usb_hcd_nxp_driver -#endif -#ifdef CONFIG_ARCH_DAVINCI_DA8XX #include "ohci-da8xx.c" #define DAVINCI_PLATFORM_DRIVER ohci_hcd_da8xx_driver
@@ -1301,12 +1296,6 @@ static int __init ohci_hcd_mod_init(void) goto error_ep93xx;#endif -#ifdef NXP_PLATFORM_DRIVER - retval =platform_driver_register (&NXP_PLATFORM_DRIVER ); -if (retval <0 ) - goto error_nxp; -#endif -#ifdef DAVINCI_PLATFORM_DRIVER retval =platform_driver_register (&DAVINCI_PLATFORM_DRIVER );if (retval <0 )
@@ -1320,10 +1309,6 @@ static int __init ohci_hcd_mod_init(void)platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER ); error_davinci:#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); - error_nxp: -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER ); error_ep93xx:
@@ -1368,9 +1353,6 @@ static void __exit ohci_hcd_mod_exit(void)#ifdef DAVINCI_PLATFORM_DRIVER platform_driver_unregister (&DAVINCI_PLATFORM_DRIVER );#endif -#ifdef NXP_PLATFORM_DRIVER -platform_driver_unregister (&NXP_PLATFORM_DRIVER ); -#endif #ifdef EP93XX_PLATFORM_DRIVER platform_driver_unregister (&EP93XX_PLATFORM_DRIVER );#endif
drivers/usb/host/ohci-nxp.c +49 -75
196 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 1/1 USB: OHCI: make ohci-nxp a separate driver
Quoted 14 lines · Manjunath Goudar
Separate the OHCI NXP host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM.
Many place function name and struct name started with usb, current scenario replaced usb with ohci for proper naming.
Signed-off-by Manjunath Goudar <[email protected]>Signed-off-by Deepak Saxena <[email protected]>Acked-by Alan Stern <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Greg KH <[email protected]>Cc linux-usb at vger.kernel.org
Quoted 8 lines
V2:
- Directive checkNXP_PLATFORM_DRIVERblock has been removed.--- drivers/usb/host/Kconfig | 8 +++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-hcd.c | 18 ------- drivers/usb/host/ohci-nxp.c | 124 +++++++++++++++++-------------------------- 4 files changed, 58 insertions(+), 93 deletions(-)
Also failed to apply:
checking file drivers/usb/host/Kconfig
Hunk #1 FAILED at 398.
1 out of 1 hunk FAILED
checking file drivers/usb/host/Makefile
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED
checking file drivers/usb/host/ohci-hcd.c
Hunk #1 succeeded at 1212 with fuzz 1 (offset 18 lines). Hunk #2 succeeded at 1349 with fuzz 1 (offset 53 lines). Hunk #3 FAILED at 1309.
Hunk #4 FAILED at 1357.
2 out of 4 hunks FAILED
checking file drivers/usb/host/ohci-nxp.c
{sigh}
That's why I required a senior Linaro developer to approve these patches. You just wasted a bunch of my time, and it was obvious that no one else actually tried these patches out, as they can't even be applied!
Deepak, come on, you know better :(
greg k-h