X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2F3c507.c;h=54e1d5aebed3af51a0ade5eedd3c032a3377428f;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=4db82893909c3118c17d0ee9435b72cf8666c112;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/drivers/net/3c507.c b/drivers/net/3c507.c index 4db828939..54e1d5aeb 100644 --- a/drivers/net/3c507.c +++ b/drivers/net/3c507.c @@ -286,7 +286,7 @@ static unsigned short init_words[] = { static int el16_probe1(struct net_device *dev, int ioaddr); static int el16_open(struct net_device *dev); static int el16_send_packet(struct sk_buff *skb, struct net_device *dev); -static irqreturn_t el16_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t el16_interrupt(int irq, void *dev_id); static void el16_rx(struct net_device *dev); static int el16_close(struct net_device *dev); static struct net_device_stats *el16_get_stats(struct net_device *dev); @@ -294,14 +294,14 @@ static void el16_tx_timeout (struct net_device *dev); static void hardware_send_packet(struct net_device *dev, void *buf, short length, short pad); static void init_82586_mem(struct net_device *dev); -static struct ethtool_ops netdev_ethtool_ops; +static const struct ethtool_ops netdev_ethtool_ops; static void init_rx_bufs(struct net_device *); static int io = 0x300; static int irq; static int mem_start; - + /* Check for a network adaptor of this type, and return '0' iff one exists. If dev->base_addr == 0, probe all likely locations. If dev->base_addr == 1, always return failure. @@ -379,7 +379,7 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr) if (!request_region(ioaddr, EL16_IO_EXTENT, DRV_NAME)) return -ENODEV; - if ((inb(ioaddr) != '*') || (inb(ioaddr + 1) != '3') || + if ((inb(ioaddr) != '*') || (inb(ioaddr + 1) != '3') || (inb(ioaddr + 2) != 'C') || (inb(ioaddr + 3) != 'O')) { retval = -ENODEV; goto out; @@ -543,7 +543,7 @@ static int el16_send_packet (struct sk_buff *skb, struct net_device *dev) /* The typical workload of the driver: Handle the network interface interrupts. */ -static irqreturn_t el16_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t el16_interrupt(int irq, void *dev_id) { struct net_device *dev = dev_id; struct net_local *lp; @@ -575,7 +575,7 @@ static irqreturn_t el16_interrupt(int irq, void *dev_id, struct pt_regs *regs) while (lp->tx_pkts_in_ring) { unsigned short tx_status = readw(shmem+lp->tx_reap); if (!(tx_status & 0x8000)) { - if (net_debug > 5) + if (net_debug > 5) printk("Tx command incomplete (%#x).\n", lp->tx_reap); break; } @@ -825,7 +825,7 @@ static void hardware_send_packet(struct net_device *dev, void *buf, short length } /* Grimly block further packets if there has been insufficient reaping. */ - if (++lp->tx_pkts_in_ring < NUM_TX_BUFS) + if (++lp->tx_pkts_in_ring < NUM_TX_BUFS) netif_wake_queue(dev); } @@ -919,7 +919,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level) debug = level; } -static struct ethtool_ops netdev_ethtool_ops = { +static const struct ethtool_ops netdev_ethtool_ops = { .get_drvinfo = netdev_get_drvinfo, .get_msglevel = netdev_get_msglevel, .set_msglevel = netdev_set_msglevel, @@ -932,7 +932,7 @@ module_param(irq, int, 0); MODULE_PARM_DESC(io, "EtherLink16 I/O base address"); MODULE_PARM_DESC(irq, "(ignored)"); -int init_module(void) +int __init init_module(void) { if (io == 0) printk("3c507: You should not use auto-probing with insmod!\n"); @@ -940,7 +940,7 @@ int init_module(void) return IS_ERR(dev_3c507) ? PTR_ERR(dev_3c507) : 0; } -void +void __exit cleanup_module(void) { struct net_device *dev = dev_3c507; @@ -953,7 +953,7 @@ cleanup_module(void) #endif /* MODULE */ MODULE_LICENSE("GPL"); - + /* * Local variables: * compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -I/usr/src/linux/drivers/net -Wall -Wstrict-prototypes -O6 -m486 -c 3c507.c"