[PATCH] USB: whitespace removal from usb/gadget/ether

This removes extraneous whitespace from the Ethernet/RNDIS gadget driver.
It's all space-at-EOL, spaces-before-tabs, or tabs-then-spaces.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
David Brownell 2006-06-13 09:54:40 -07:00 committed by Greg Kroah-Hartman
parent d5681fe811
commit 7e27f18c8a
3 changed files with 251 additions and 250 deletions

View file

@ -101,9 +101,9 @@ static const char driver_desc [] = DRIVER_DESC;
/* CDC and RNDIS support the same host-chosen outgoing packet filters. */
#define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \
|USB_CDC_PACKET_TYPE_ALL_MULTICAST \
|USB_CDC_PACKET_TYPE_PROMISCUOUS \
|USB_CDC_PACKET_TYPE_DIRECTED)
|USB_CDC_PACKET_TYPE_ALL_MULTICAST \
|USB_CDC_PACKET_TYPE_PROMISCUOUS \
|USB_CDC_PACKET_TYPE_DIRECTED)
/*-------------------------------------------------------------------------*/
@ -318,7 +318,7 @@ static inline int rndis_active(struct eth_dev *dev)
#define DEFAULT_QLEN 2 /* double buffering by default */
/* peak bulk transfer bits-per-second */
#define HS_BPS (13 * 512 * 8 * 1000 * 8)
#define HS_BPS (13 * 512 * 8 * 1000 * 8)
#define FS_BPS (19 * 64 * 1 * 1000 * 8)
#ifdef CONFIG_USB_GADGET_DUALSPEED
@ -545,20 +545,20 @@ static const struct usb_cdc_union_desc union_desc = {
#ifdef CONFIG_USB_ETH_RNDIS
static const struct usb_cdc_call_mgmt_descriptor call_mgmt_descriptor = {
.bLength = sizeof call_mgmt_descriptor,
.bDescriptorType = USB_DT_CS_INTERFACE,
.bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE,
.bLength = sizeof call_mgmt_descriptor,
.bDescriptorType = USB_DT_CS_INTERFACE,
.bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE,
.bmCapabilities = 0x00,
.bDataInterface = 0x01,
.bmCapabilities = 0x00,
.bDataInterface = 0x01,
};
static const struct usb_cdc_acm_descriptor acm_descriptor = {
.bLength = sizeof acm_descriptor,
.bDescriptorType = USB_DT_CS_INTERFACE,
.bDescriptorSubType = USB_CDC_ACM_TYPE,
.bLength = sizeof acm_descriptor,
.bDescriptorType = USB_DT_CS_INTERFACE,
.bDescriptorSubType = USB_CDC_ACM_TYPE,
.bmCapabilities = 0x00,
.bmCapabilities = 0x00,
};
#endif
@ -1144,7 +1144,7 @@ eth_set_config (struct eth_dev *dev, unsigned number, gfp_t gfp_flags)
#ifdef CONFIG_USB_GADGET_DUALSPEED
case USB_SPEED_HIGH: speed = "high"; break;
#endif
default: speed = "?"; break;
default: speed = "?"; break;
}
dev->config = number;
@ -2374,8 +2374,8 @@ autoconf_fail:
#endif
}
net = alloc_etherdev (sizeof *dev);
if (!net)
net = alloc_etherdev (sizeof *dev);
if (!net)
return status;
dev = netdev_priv(net);
spin_lock_init (&dev->lock);
@ -2462,8 +2462,8 @@ autoconf_fail:
netif_stop_queue (dev->net);
netif_carrier_off (dev->net);
SET_NETDEV_DEV (dev->net, &gadget->dev);
status = register_netdev (dev->net);
SET_NETDEV_DEV (dev->net, &gadget->dev);
status = register_netdev (dev->net);
if (status < 0)
goto fail1;
@ -2556,7 +2556,7 @@ static struct usb_gadget_driver eth_driver = {
.suspend = eth_suspend,
.resume = eth_resume,
.driver = {
.driver = {
.name = (char *) shortname,
.owner = THIS_MODULE,
},

View file

@ -4,7 +4,7 @@
* Version: $Id: rndis.c,v 1.19 2004/03/25 21:33:46 robert Exp $
*
* Authors: Benedikt Spranger, Pengutronix
* Robert Schwebel, Pengutronix
* Robert Schwebel, Pengutronix
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -17,7 +17,7 @@
* Fixed message length bug in init_response
*
* 03/25/2004 Kai-Uwe Bloem <linux-development@auerswald.de>
* Fixed rndis_rm_hdr length bug.
* Fixed rndis_rm_hdr length bug.
*
* Copyright (C) 2004 by David Brownell
* updates to merge with Linux 2.6, better match RNDIS spec
@ -127,7 +127,7 @@ static const u32 oid_supported_list [] =
OID_GEN_TRANSMIT_QUEUE_LENGTH,
#endif /* RNDIS_OPTIONAL_STATS */
/* mandatory 802.3 */
/* mandatory 802.3 */
/* the general stuff */
OID_802_3_PERMANENT_ADDRESS,
OID_802_3_CURRENT_ADDRESS,
@ -172,8 +172,8 @@ static int
gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
rndis_resp_t *r)
{
int retval = -ENOTSUPP;
u32 length = 4; /* usually */
int retval = -ENOTSUPP;
u32 length = 4; /* usually */
__le32 *outbuf;
int i, count;
rndis_query_cmplt_type *resp;
@ -689,10 +689,10 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
}
static int gen_ndis_set_resp (u8 configNr, u32 OID, u8 *buf, u32 buf_len,
rndis_resp_t *r)
rndis_resp_t *r)
{
rndis_set_cmplt_type *resp;
int i, retval = -ENOTSUPP;
int i, retval = -ENOTSUPP;
struct rndis_params *params;
if (!r)
@ -839,8 +839,8 @@ static int rndis_init_response (int configNr, rndis_init_msg_type *buf)
resp->AFListSize = __constant_cpu_to_le32 (0);
if (rndis_per_dev_params [configNr].ack)
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
return 0;
}
@ -883,8 +883,8 @@ static int rndis_query_response (int configNr, rndis_query_msg_type *buf)
resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
if (rndis_per_dev_params [configNr].ack)
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
return 0;
}
@ -918,13 +918,14 @@ static int rndis_set_response (int configNr, rndis_set_msg_type *buf)
resp->MessageLength = __constant_cpu_to_le32 (16);
resp->RequestID = buf->RequestID; /* Still LE in msg buffer */
if (gen_ndis_set_resp (configNr, le32_to_cpu (buf->OID),
((u8 *) buf) + 8 + BufOffset, BufLength, r))
resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_NOT_SUPPORTED);
else resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
((u8 *) buf) + 8 + BufOffset, BufLength, r))
resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_NOT_SUPPORTED);
else
resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
if (rndis_per_dev_params [configNr].ack)
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
return 0;
}
@ -946,14 +947,14 @@ static int rndis_reset_response (int configNr, rndis_reset_msg_type *buf)
resp->AddressingReset = __constant_cpu_to_le32 (1);
if (rndis_per_dev_params [configNr].ack)
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
return 0;
}
static int rndis_keepalive_response (int configNr,
rndis_keepalive_msg_type *buf)
rndis_keepalive_msg_type *buf)
{
rndis_keepalive_cmplt_type *resp;
rndis_resp_t *r;
@ -972,8 +973,8 @@ static int rndis_keepalive_response (int configNr,
resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS);
if (rndis_per_dev_params [configNr].ack)
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
return 0;
}
@ -988,7 +989,7 @@ static int rndis_indicate_status_msg (int configNr, u32 status)
rndis_resp_t *r;
if (rndis_per_dev_params [configNr].state == RNDIS_UNINITIALIZED)
return -ENOTSUPP;
return -ENOTSUPP;
r = rndis_add_response (configNr,
sizeof (rndis_indicate_status_msg_type));
@ -1004,8 +1005,8 @@ static int rndis_indicate_status_msg (int configNr, u32 status)
resp->StatusBufferOffset = __constant_cpu_to_le32 (0);
if (rndis_per_dev_params [configNr].ack)
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
rndis_per_dev_params [configNr].ack (
rndis_per_dev_params [configNr].dev);
return 0;
}
@ -1077,7 +1078,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf)
__FUNCTION__ );
params->state = RNDIS_INITIALIZED;
return rndis_init_response (configNr,
(rndis_init_msg_type *) buf);
(rndis_init_msg_type *) buf);
case REMOTE_NDIS_HALT_MSG:
DEBUG("%s: REMOTE_NDIS_HALT_MSG\n",
@ -1091,17 +1092,17 @@ int rndis_msg_parser (u8 configNr, u8 *buf)
case REMOTE_NDIS_QUERY_MSG:
return rndis_query_response (configNr,
(rndis_query_msg_type *) buf);
(rndis_query_msg_type *) buf);
case REMOTE_NDIS_SET_MSG:
return rndis_set_response (configNr,
(rndis_set_msg_type *) buf);
(rndis_set_msg_type *) buf);
case REMOTE_NDIS_RESET_MSG:
DEBUG("%s: REMOTE_NDIS_RESET_MSG\n",
__FUNCTION__ );
return rndis_reset_response (configNr,
(rndis_reset_msg_type *) buf);
(rndis_reset_msg_type *) buf);
case REMOTE_NDIS_KEEPALIVE_MSG:
/* For USB: host does this every 5 seconds */
@ -1231,7 +1232,7 @@ void rndis_free_response (int configNr, u8 *buf)
struct list_head *act, *tmp;
list_for_each_safe (act, tmp,
&(rndis_per_dev_params [configNr].resp_queue))
&(rndis_per_dev_params [configNr].resp_queue))
{
r = list_entry (act, rndis_resp_t, list);
if (r && r->buf == buf) {
@ -1244,12 +1245,12 @@ void rndis_free_response (int configNr, u8 *buf)
u8 *rndis_get_next_response (int configNr, u32 *length)
{
rndis_resp_t *r;
struct list_head *act, *tmp;
struct list_head *act, *tmp;
if (!length) return NULL;
list_for_each_safe (act, tmp,
&(rndis_per_dev_params [configNr].resp_queue))
&(rndis_per_dev_params [configNr].resp_queue))
{
r = list_entry (act, rndis_resp_t, list);
if (!r->send) {
@ -1275,7 +1276,7 @@ static rndis_resp_t *rndis_add_response (int configNr, u32 length)
r->send = 0;
list_add_tail (&r->list,
&(rndis_per_dev_params [configNr].resp_queue));
&(rndis_per_dev_params [configNr].resp_queue));
return r;
}
@ -1302,7 +1303,7 @@ int rndis_rm_hdr(struct sk_buff *skb)
#ifdef CONFIG_USB_GADGET_DEBUG_FILES
static int rndis_proc_read (char *page, char **start, off_t off, int count, int *eof,
void *data)
void *data)
{
char *out = page;
int len;
@ -1347,7 +1348,7 @@ static int rndis_proc_read (char *page, char **start, off_t off, int count, int
}
static int rndis_proc_write (struct file *file, const char __user *buffer,
unsigned long count, void *data)
unsigned long count, void *data)
{
rndis_params *p = data;
u32 speed = 0;

View file

@ -4,9 +4,9 @@
* Version: $Id: rndis.h,v 1.15 2004/03/25 21:33:46 robert Exp $
*
* Authors: Benedikt Spranger, Pengutronix
* Robert Schwebel, Pengutronix
* Robert Schwebel, Pengutronix
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2, as published by the Free Software Foundation.
*
@ -234,12 +234,12 @@ typedef struct rndis_params
const u8 *host_mac;
u16 *filter;
struct net_device *dev;
struct net_device *dev;
struct net_device_stats *stats;
u32 vendorID;
const char *vendorDescr;
int (*ack) (struct net_device *);
int (*ack) (struct net_device *);
struct list_head resp_queue;
} rndis_params;