Subject: USB: resolve ethernet gadget build glitch on pxa

From: David Brownell <[email-masked]>
Date: Mon, 13 Jun 2005 06:55:03 -0700

This fixes a build error on pxa25x processes with pxa2xx_udc and

        CONFIG_USB_ETH=m
        # CONFIG_USB_ETH_RNDIS is not set

The error is because on that CPU there's no status transfer support
except with RNDIS.  Workaround, enable the RNDIS support too.

Signed-off-by: Ian Campbell <[email-masked]>
Signed-off-by: David Brownell <[email-masked]>
Signed-off-by: Greg Kroah-Hartman <[email-masked]>

---
 drivers/usb/gadget/ether.c |    2 ++
 1 files changed, 2 insertions(+)

--- gregkh-2.6.orig/drivers/usb/gadget/ether.c	2005-06-16 16:03:39.000000000 -0700
+++ gregkh-2.6/drivers/usb/gadget/ether.c	2005-06-16 16:11:23.000000000 -0700
@@ -2428,6 +2428,7 @@
 	dev->req->complete = eth_setup_complete;
 
 	/* ... and maybe likewise for status transfer */
+#ifdef DEV_CONFIG_CDC
 	if (dev->status_ep) {
 		dev->stat_req = eth_req_alloc (dev->status_ep,
 					STATUS_BYTECOUNT, GFP_KERNEL);
@@ -2437,6 +2438,7 @@
 		}
 		dev->stat_req->context = NULL;
 	}
+#endif
 
 	/* finish hookup to lower layer ... */
 	dev->gadget = gadget;