Commit abf058e1 authored by David Miller's avatar David Miller Committed by Greg Kroah-Hartman

USB: Fix usb/isp1760 build on sparc

This commit:

commit 8f5d6215
Author: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
Date:   Mon Oct 10 18:06:54 2011 +0200

    usb/isp1760: Let OF bindings depend on general CONFIG_OF instead of PPC_OF .

    To be able to use the driver on other OF-aware architectures, too.
    And add necessary OF related #includes to fix compilation error.
Signed-off-by: default avatarJoachim Foerster <joachim.foerster@missinglinkelectronics.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>

enabled the build on all CONFIG_OF architectures, but it cannot do
this.

This driver depends upon CONFIG_OF_IRQ but not all CONFIG_OF platforms
support that infrastructure, in particular Sparc does not so the
build fails.

Please push a patch like the following to Linus so that this code only
gets built where it actually should.

--------------------
usb/isp1760: Add missing CONFIG_OF_IRQ dependency on OF code.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 384703b8
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "isp1760-hcd.h" #include "isp1760-hcd.h"
#ifdef CONFIG_OF #if defined(CONFIG_OF) && defined(CONFIG_OF_IRQ)
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <linux/pci.h> #include <linux/pci.h>
#endif #endif
#ifdef CONFIG_OF #if defined(CONFIG_OF) && defined(CONFIG_OF_IRQ)
struct isp1760 { struct isp1760 {
struct usb_hcd *hcd; struct usb_hcd *hcd;
int rst_gpio; int rst_gpio;
...@@ -437,7 +437,7 @@ static int __init isp1760_init(void) ...@@ -437,7 +437,7 @@ static int __init isp1760_init(void)
ret = platform_driver_register(&isp1760_plat_driver); ret = platform_driver_register(&isp1760_plat_driver);
if (!ret) if (!ret)
any_ret = 0; any_ret = 0;
#ifdef CONFIG_OF #if defined(CONFIG_OF) && defined(CONFIG_OF_IRQ)
ret = platform_driver_register(&isp1760_of_driver); ret = platform_driver_register(&isp1760_of_driver);
if (!ret) if (!ret)
any_ret = 0; any_ret = 0;
...@@ -457,7 +457,7 @@ module_init(isp1760_init); ...@@ -457,7 +457,7 @@ module_init(isp1760_init);
static void __exit isp1760_exit(void) static void __exit isp1760_exit(void)
{ {
platform_driver_unregister(&isp1760_plat_driver); platform_driver_unregister(&isp1760_plat_driver);
#ifdef CONFIG_OF #if defined(CONFIG_OF) && defined(CONFIG_OF_IRQ)
platform_driver_unregister(&isp1760_of_driver); platform_driver_unregister(&isp1760_of_driver);
#endif #endif
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
......
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