aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/multi.c
diff options
context:
space:
mode:
authorMichal Nazarewicz <m.nazarewicz@samsung.com>2009-11-30 10:55:40 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 11:55:27 -0800
commit396cda90d228d0851f3d64c7c85a1ecf6b8ae1e8 (patch)
tree9fc9df689e3d9e38b51d2a50d7bf0feb2978e1d8 /drivers/usb/gadget/multi.c
parent3f0479e00a3fca9590ae8d9edc4e9c47b7fa0610 (diff)
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/multi.c')
-rw-r--r--drivers/usb/gadget/multi.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c
index 64711feca84..429560100b1 100644
--- a/drivers/usb/gadget/multi.c
+++ b/drivers/usb/gadget/multi.c
@@ -26,8 +26,11 @@
#include <linux/utsname.h>
-#if defined CONFIG_USB_G_MULTI_RNDIS
-# define CONFIG_USB_ETH_RNDIS y
+#if defined USB_ETH_RNDIS
+# undef USB_ETH_RNDIS
+#endif
+#ifdef CONFIG_USB_ETH_RNDIS
+# define USB_ETH_RNDIS y
#endif
@@ -59,7 +62,7 @@
#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
@@ -150,7 +153,7 @@ FSG_MODULE_PARAMETERS(/* no prefix */, mod_data);
static struct fsg_common *fsg_common;
-#ifdef CONFIG_USB_ETH_RNDIS
+#ifdef USB_ETH_RNDIS
static int __init rndis_do_config(struct usb_configuration *c)
{
@@ -292,7 +295,7 @@ static int __init multi_bind(struct usb_composite_dev *cdev)
strings_dev[STRING_PRODUCT_IDX].id = status;
device_desc.iProduct = status;
-#ifdef CONFIG_USB_ETH_RNDIS
+#ifdef USB_ETH_RNDIS
/* register our first configuration */
status = usb_add_config(cdev, &rndis_config_driver);
if (status < 0)