drivers/net: request_irq - Remove unnecessary leading & from second arg
[safe/jmp/linux-2.6] / drivers / net / eepro.c
index 93387f1..94c5949 100644 (file)
@@ -309,7 +309,8 @@ struct eepro_local {
 
 static int     eepro_probe1(struct net_device *dev, int autoprobe);
 static int     eepro_open(struct net_device *dev);
-static int     eepro_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t eepro_send_packet(struct sk_buff *skb,
+                                    struct net_device *dev);
 static irqreturn_t eepro_interrupt(int irq, void *dev_id);
 static void    eepro_rx(struct net_device *dev);
 static void    eepro_transmit_interrupt(struct net_device *dev);
@@ -605,7 +606,7 @@ out:
 
 static void __init printEEPROMInfo(struct net_device *dev)
 {
-       struct eepro_local *lp = (struct eepro_local *)dev->priv;
+       struct eepro_local *lp = netdev_priv(dev);
        int ioaddr = dev->base_addr;
        unsigned short Word;
        int i,j;
@@ -739,6 +740,17 @@ static void __init eepro_print_info (struct net_device *dev)
 
 static const struct ethtool_ops eepro_ethtool_ops;
 
+static const struct net_device_ops eepro_netdev_ops = {
+       .ndo_open               = eepro_open,
+       .ndo_stop               = eepro_close,
+       .ndo_start_xmit         = eepro_send_packet,
+       .ndo_set_multicast_list = set_multicast_list,
+       .ndo_tx_timeout         = eepro_tx_timeout,
+       .ndo_change_mtu         = eth_change_mtu,
+       .ndo_set_mac_address    = eth_mac_addr,
+       .ndo_validate_addr      = eth_validate_addr,
+};
+
 /* This is the real probe routine.  Linux has a history of friendly device
    probes on the ISA bus.  A good device probe avoids doing writes, and
    verifies that the correct device exists and functions.  */
@@ -851,11 +863,7 @@ static int __init eepro_probe1(struct net_device *dev, int autoprobe)
                }
        }
 
-       dev->open               = eepro_open;
-       dev->stop               = eepro_close;
-       dev->hard_start_xmit    = eepro_send_packet;
-       dev->set_multicast_list = &set_multicast_list;
-       dev->tx_timeout         = eepro_tx_timeout;
+       dev->netdev_ops         = &eepro_netdev_ops;
        dev->watchdog_timeo     = TX_TIMEOUT;
        dev->ethtool_ops        = &eepro_ethtool_ops;
 
@@ -982,7 +990,7 @@ static int eepro_open(struct net_device *dev)
                return -EAGAIN;
        }
 
-       if (request_irq(dev->irq , &eepro_interrupt, 0, dev->name, dev)) {
+       if (request_irq(dev->irq , eepro_interrupt, 0, dev->name, dev)) {
                printk(KERN_ERR "%s: unable to get IRQ %d.\n", dev->name, dev->irq);
                return -EAGAIN;
        }
@@ -1126,7 +1134,8 @@ static void eepro_tx_timeout (struct net_device *dev)
 }
 
 
-static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t eepro_send_packet(struct sk_buff *skb,
+                                    struct net_device *dev)
 {
        struct eepro_local *lp = netdev_priv(dev);
        unsigned long flags;
@@ -1138,7 +1147,7 @@ static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev)
 
        if (length < ETH_ZLEN) {
                if (skb_padto(skb, ETH_ZLEN))
-                       return 0;
+                       return NETDEV_TX_OK;
                length = ETH_ZLEN;
        }
        netif_stop_queue (dev);
@@ -1171,7 +1180,7 @@ static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev)
        eepro_en_int(ioaddr);
        spin_unlock_irqrestore(&lp->lock, flags);
 
-       return 0;
+       return NETDEV_TX_OK;
 }
 
 
@@ -1395,7 +1404,7 @@ set_multicast_list(struct net_device *dev)
 #define eeprom_delay() { udelay(40); }
 #define EE_READ_CMD (6 << 6)
 
-int
+static int
 read_eeprom(int ioaddr, int location, struct net_device *dev)
 {
        int i;
@@ -1674,7 +1683,7 @@ eepro_transmit_interrupt(struct net_device *dev)
 static int eepro_ethtool_get_settings(struct net_device *dev,
                                        struct ethtool_cmd *cmd)
 {
-       struct eepro_local      *lp = (struct eepro_local *)dev->priv;
+       struct eepro_local      *lp = netdev_priv(dev);
 
        cmd->supported =        SUPPORTED_10baseT_Half |
                                SUPPORTED_10baseT_Full |
@@ -1777,7 +1786,7 @@ int __init init_module(void)
                printk(KERN_INFO "eepro_init_module: Auto-detecting boards (May God protect us...)\n");
        }
 
-       for (i = 0; io[i] != -1 && i < MAX_EEPRO; i++) {
+       for (i = 0; i < MAX_EEPRO && io[i] != -1; i++) {
                dev = alloc_etherdev(sizeof(struct eepro_local));
                if (!dev)
                        break;