diff options
author | Michal Nazarewicz <m.nazarewicz@samsung.com> | 2009-11-30 09:55:40 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 19:55:27 (GMT) |
commit | 396cda90d228d0851f3d64c7c85a1ecf6b8ae1e8 (patch) | |
tree | 9fc9df689e3d9e38b51d2a50d7bf0feb2978e1d8 /drivers/usb/gadget/ether.c | |
parent | 3f0479e00a3fca9590ae8d9edc4e9c47b7fa0610 (diff) | |
download | linux-fsl-qoriq-396cda90d228d0851f3d64c7c85a1ecf6b8ae1e8.tar.xz |
USB: Added USB_ETH_RNDIS to use instead of CONFIG_USB_ETH_RNDIS
If g_ether and g_multi are both built CONFIG_USB_ETH_RNDIS symbol
may be redefined in the later and, whats even worse, g_ether's settings
may affect g_multi's. This adds a USB_ETH_RNDIS symbol defined at the
beginning of ether.c and multi.c according toproper KConfig settings.
Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/ether.c')
-rw-r--r-- | drivers/usb/gadget/ether.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 167cb2a..141372b 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -25,6 +25,14 @@ #include <linux/kernel.h> #include <linux/utsname.h> + +#if defined USB_ETH_RNDIS +# undef USB_ETH_RNDIS +#endif +#ifdef CONFIG_USB_ETH_RNDIS +# define USB_ETH_RNDIS y +#endif + #include "u_ether.h" @@ -66,7 +74,7 @@ #define DRIVER_DESC "Ethernet Gadget" #define DRIVER_VERSION "Memorial Day 2008" -#ifdef CONFIG_USB_ETH_RNDIS +#ifdef USB_ETH_RNDIS #define PREFIX "RNDIS/" #else #define PREFIX "" @@ -87,7 +95,7 @@ static inline bool has_rndis(void) { -#ifdef CONFIG_USB_ETH_RNDIS +#ifdef USB_ETH_RNDIS return true; #else return false; @@ -110,7 +118,7 @@ static inline bool has_rndis(void) #include "f_ecm.c" #include "f_subset.c" -#ifdef CONFIG_USB_ETH_RNDIS +#ifdef USB_ETH_RNDIS #include "f_rndis.c" #include "rndis.c" #endif @@ -251,7 +259,7 @@ static struct usb_configuration rndis_config_driver = { /*-------------------------------------------------------------------------*/ -#ifdef CONFIG_USB_ETH_EEM +#ifdef USB_ETH_EEM static int use_eem = 1; #else static int use_eem; |