usb: pegasus: fixed coding style issues
Fixed brace, static initialization, comment, whitespace and spacing coding style issues. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
de84727214
commit
5a9dbfe08e
|
@ -55,9 +55,9 @@ static const char driver_name[] = "pegasus";
|
|||
#define BMSR_MEDIA (BMSR_10HALF | BMSR_10FULL | BMSR_100HALF | \
|
||||
BMSR_100FULL | BMSR_ANEGCAPABLE)
|
||||
|
||||
static int loopback = 0;
|
||||
static int mii_mode = 0;
|
||||
static char *devid=NULL;
|
||||
static int loopback;
|
||||
static int mii_mode;
|
||||
static char *devid;
|
||||
|
||||
static struct usb_eth_dev usb_dev_id[] = {
|
||||
#define PEGASUS_DEV(pn, vid, pid, flags) \
|
||||
|
@ -667,11 +667,11 @@ static void read_bulk_callback(struct urb *urb)
|
|||
netif_dbg(pegasus, rx_err, net,
|
||||
"RX packet error %x\n", rx_status);
|
||||
pegasus->stats.rx_errors++;
|
||||
if (rx_status & 0x06) // long or runt
|
||||
if (rx_status & 0x06) /* long or runt */
|
||||
pegasus->stats.rx_length_errors++;
|
||||
if (rx_status & 0x08)
|
||||
pegasus->stats.rx_crc_errors++;
|
||||
if (rx_status & 0x10) // extra bits
|
||||
if (rx_status & 0x10) /* extra bits */
|
||||
pegasus->stats.rx_frame_errors++;
|
||||
goto goon;
|
||||
}
|
||||
|
@ -748,9 +748,8 @@ static void rx_fixup(unsigned long data)
|
|||
if (pegasus->flags & PEGASUS_RX_URB_FAIL)
|
||||
if (pegasus->rx_skb)
|
||||
goto try_again;
|
||||
if (pegasus->rx_skb == NULL) {
|
||||
if (pegasus->rx_skb == NULL)
|
||||
pegasus->rx_skb = pull_skb(pegasus);
|
||||
}
|
||||
if (pegasus->rx_skb == NULL) {
|
||||
netif_warn(pegasus, rx_err, pegasus->net, "low on memory\n");
|
||||
tasklet_schedule(&pegasus->rx_tl);
|
||||
|
@ -980,9 +979,8 @@ static void unlink_all_urbs(pegasus_t * pegasus)
|
|||
static int alloc_urbs(pegasus_t *pegasus)
|
||||
{
|
||||
pegasus->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if (!pegasus->ctrl_urb) {
|
||||
if (!pegasus->ctrl_urb)
|
||||
return 0;
|
||||
}
|
||||
pegasus->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if (!pegasus->rx_urb) {
|
||||
usb_free_urb(pegasus->ctrl_urb);
|
||||
|
@ -1254,11 +1252,10 @@ static inline void setup_pegasus_II(pegasus_t * pegasus)
|
|||
set_register(pegasus, 0x83, data);
|
||||
get_registers(pegasus, 0x83, 1, &data);
|
||||
|
||||
if (data == 0xa5) {
|
||||
if (data == 0xa5)
|
||||
pegasus->chip = 0x8513;
|
||||
} else {
|
||||
else
|
||||
pegasus->chip = 0;
|
||||
}
|
||||
|
||||
set_register(pegasus, 0x80, 0xc0);
|
||||
set_register(pegasus, 0x83, 0xff);
|
||||
|
@ -1272,7 +1269,7 @@ static inline void setup_pegasus_II(pegasus_t * pegasus)
|
|||
|
||||
|
||||
static int pegasus_count;
|
||||
static struct workqueue_struct *pegasus_workqueue = NULL;
|
||||
static struct workqueue_struct *pegasus_workqueue;
|
||||
#define CARRIER_CHECK_DELAY (2 * HZ)
|
||||
|
||||
static void check_carrier(struct work_struct *work)
|
||||
|
|
Loading…
Reference in New Issue