]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/gadget/ether.c
Merge branch 'pxa' into devel
[linux-2.6-omap-h63xx.git] / drivers / usb / gadget / ether.c
index a70e255402b86e60aed06c1e54194909d25b916a..4ce3950b997fb887507d28495e524cce94c812b2 100644 (file)
@@ -235,10 +235,6 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address");
 #define        DEV_CONFIG_CDC
 #endif
 
-#ifdef CONFIG_USB_GADGET_PXA27X
-#define DEV_CONFIG_CDC
-#endif
-
 #ifdef CONFIG_USB_GADGET_S3C2410
 #define DEV_CONFIG_CDC
 #endif
@@ -266,7 +262,11 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address");
 /* For CDC-incapable hardware, choose the simple cdc subset.
  * Anything that talks bulk (without notable bugs) can do this.
  */
-#ifdef CONFIG_USB_GADGET_PXA2XX
+#ifdef CONFIG_USB_GADGET_PXA25X
+#define        DEV_CONFIG_SUBSET
+#endif
+
+#ifdef CONFIG_USB_GADGET_PXA27X
 #define        DEV_CONFIG_SUBSET
 #endif
 
@@ -1102,7 +1102,7 @@ static void eth_reset_config (struct eth_dev *dev)
        if (dev->config == 0)
                return;
 
-       DEBUG (dev, "%s\n", __FUNCTION__);
+       DEBUG (dev, "%s\n", __func__);
 
        netif_stop_queue (dev->net);
        netif_carrier_off (dev->net);
@@ -1263,7 +1263,7 @@ static void issue_start_status (struct eth_dev *dev)
        struct usb_cdc_notification     *event;
        int                             value;
 
-       DEBUG (dev, "%s, flush old status first\n", __FUNCTION__);
+       DEBUG (dev, "%s, flush old status first\n", __func__);
 
        /* flush old status
         *
@@ -1329,7 +1329,7 @@ static void rndis_command_complete (struct usb_ep *ep, struct usb_request *req)
        spin_lock(&dev->lock);
        status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf);
        if (status < 0)
-               ERROR(dev, "%s: rndis parse error %d\n", __FUNCTION__, status);
+               ERROR(dev, "%s: rndis parse error %d\n", __func__, status);
        spin_unlock(&dev->lock);
 }
 
@@ -1561,6 +1561,7 @@ done_set_intf:
                                memcpy(req->buf, buf, n);
                                req->complete = rndis_response_complete;
                                rndis_free_response(dev->rndis_config, buf);
+                               value = n;
                        }
                        /* else stalls ... spec says to avoid that */
                }
@@ -2112,7 +2113,7 @@ static int rndis_control_ack (struct net_device *net)
 
 static void eth_start (struct eth_dev *dev, gfp_t gfp_flags)
 {
-       DEBUG (dev, "%s\n", __FUNCTION__);
+       DEBUG (dev, "%s\n", __func__);
 
        /* fill the rx queue */
        rx_fill (dev, gfp_flags);
@@ -2132,7 +2133,7 @@ static int eth_open (struct net_device *net)
 {
        struct eth_dev          *dev = netdev_priv(net);
 
-       DEBUG (dev, "%s\n", __FUNCTION__);
+       DEBUG (dev, "%s\n", __func__);
        if (netif_carrier_ok (dev->net))
                eth_start (dev, GFP_KERNEL);
        return 0;
@@ -2142,7 +2143,7 @@ static int eth_stop (struct net_device *net)
 {
        struct eth_dev          *dev = netdev_priv(net);
 
-       VDEBUG (dev, "%s\n", __FUNCTION__);
+       VDEBUG (dev, "%s\n", __func__);
        netif_stop_queue (net);
 
        DEBUG (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n",
@@ -2228,7 +2229,7 @@ eth_unbind (struct usb_gadget *gadget)
        set_gadget_data (gadget, NULL);
 }
 
-static u8 __devinit nibble (unsigned char c)
+static u8 __init nibble (unsigned char c)
 {
        if (likely (isdigit (c)))
                return c - '0';
@@ -2238,7 +2239,7 @@ static u8 __devinit nibble (unsigned char c)
        return 0;
 }
 
-static int __devinit get_ether_addr(const char *str, u8 *dev_addr)
+static int __init get_ether_addr(const char *str, u8 *dev_addr)
 {
        if (str) {
                unsigned        i;
@@ -2259,7 +2260,7 @@ static int __devinit get_ether_addr(const char *str, u8 *dev_addr)
        return 1;
 }
 
-static int __devinit
+static int __init
 eth_bind (struct usb_gadget *gadget)
 {
        struct eth_dev          *dev;