diff mbox

[1/2] isp1760: Make probing via device tree non-powerpc-specific

Message ID 1316008633-31009-2-git-send-email-dave.martin@linaro.org
State Accepted
Commit 8f5d621543cb064d2989fc223d3c2bc61a43981e
Headers show

Commit Message

Dave Martin Sept. 14, 2011, 1:57 p.m. UTC
This patch just replaces the (presumably historical) CONFIG_OF_PPC

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Pawel Moll <pawel.moll@arm.com>
---
 drivers/usb/host/isp1760-if.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

Comments

Dave Martin Sept. 14, 2011, 2:10 p.m. UTC | #1
On Wed, Sep 14, 2011 at 2:57 PM, Dave Martin <dave.martin@linaro.org> wrote:
> This patch just replaces the (presumably historical) CONFIG_OF_PPC

Apologies, it looks like a script ate part of the commit message for
this commit.

It should read:

    isp1760: Make probing via device tree non-powerpc-specific

    This patch just replaces the (presumably historical) CONFIG_OF_PPC
    ifdefs with CONFIG_OF, and supplies some missing includes.


I can fix that when reposting, but feedback on the patch is still
appreciated in the meantime.

Thanks
---Dave

>
> Signed-off-by: Dave Martin <dave.martin@linaro.org>
> Acked-by: Pawel Moll <pawel.moll@arm.com>
> ---
>  drivers/usb/host/isp1760-if.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
> index 7ee3005..69ee32c 100644
> --- a/drivers/usb/host/isp1760-if.c
> +++ b/drivers/usb/host/isp1760-if.c
> @@ -17,16 +17,18 @@
>
>  #include "isp1760-hcd.h"
>
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  #include <linux/of.h>
>  #include <linux/of_platform.h>
> +#include <linux/of_address.h>
> +#include <linux/of_irq.h>
>  #endif
>
>  #ifdef CONFIG_PCI
>  #include <linux/pci.h>
>  #endif
>
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  static int of_isp1760_probe(struct platform_device *dev)
>  {
>        struct usb_hcd *hcd;
> @@ -396,7 +398,7 @@ static int __init isp1760_init(void)
>        ret = platform_driver_register(&isp1760_plat_driver);
>        if (!ret)
>                any_ret = 0;
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>        ret = platform_driver_register(&isp1760_of_driver);
>        if (!ret)
>                any_ret = 0;
> @@ -416,7 +418,7 @@ module_init(isp1760_init);
>  static void __exit isp1760_exit(void)
>  {
>        platform_driver_unregister(&isp1760_plat_driver);
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>        platform_driver_unregister(&isp1760_of_driver);
>  #endif
>  #ifdef CONFIG_PCI
> --
> 1.7.4.1
>
>
Grant Likely Sept. 14, 2011, 3:43 p.m. UTC | #2
On Wed, Sep 14, 2011 at 02:57:12PM +0100, Dave Martin wrote:
> This patch just replaces the (presumably historical) CONFIG_OF_PPC
> 
> Signed-off-by: Dave Martin <dave.martin@linaro.org>
> Acked-by: Pawel Moll <pawel.moll@arm.com>
> ---
>  drivers/usb/host/isp1760-if.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
> index 7ee3005..69ee32c 100644
> --- a/drivers/usb/host/isp1760-if.c
> +++ b/drivers/usb/host/isp1760-if.c
> @@ -17,16 +17,18 @@
>  
>  #include "isp1760-hcd.h"
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF

This #ifdef can just be dropped entirely.  linux/of*.h is always safe to
include now.

>  #include <linux/of.h>
>  #include <linux/of_platform.h>
> +#include <linux/of_address.h>
> +#include <linux/of_irq.h>
>  #endif
>  
>  #ifdef CONFIG_PCI
>  #include <linux/pci.h>
>  #endif
>  
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  static int of_isp1760_probe(struct platform_device *dev)
>  {
>  	struct usb_hcd *hcd;
> @@ -396,7 +398,7 @@ static int __init isp1760_init(void)
>  	ret = platform_driver_register(&isp1760_plat_driver);
>  	if (!ret)
>  		any_ret = 0;
> -#ifdef CONFIG_PPC_OF
> +#ifdef CONFIG_OF
>  	ret = platform_driver_register(&isp1760_of_driver);
>  	if (!ret)
>  		any_ret = 0;

This should really be changed.  It used to be that of_platform_driver
and platform_driver were different things, but that is no longer the
case.  A single platform_driver should handle both the DT and non-DT
use cases.

That said, I don't have any objection to this patch being merged.  I'd
just be happier if it was cleaned up properly.

g.
diff mbox

Patch

diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index 7ee3005..69ee32c 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -17,16 +17,18 @@ 
 
 #include "isp1760-hcd.h"
 
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
 #endif
 
 #ifdef CONFIG_PCI
 #include <linux/pci.h>
 #endif
 
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 static int of_isp1760_probe(struct platform_device *dev)
 {
 	struct usb_hcd *hcd;
@@ -396,7 +398,7 @@  static int __init isp1760_init(void)
 	ret = platform_driver_register(&isp1760_plat_driver);
 	if (!ret)
 		any_ret = 0;
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 	ret = platform_driver_register(&isp1760_of_driver);
 	if (!ret)
 		any_ret = 0;
@@ -416,7 +418,7 @@  module_init(isp1760_init);
 static void __exit isp1760_exit(void)
 {
 	platform_driver_unregister(&isp1760_plat_driver);
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_OF
 	platform_driver_unregister(&isp1760_of_driver);
 #endif
 #ifdef CONFIG_PCI