X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fcris%2Feth_v10.c;fp=drivers%2Fnet%2Fcris%2Feth_v10.c;h=a03d781f6d0a459c56f6009d56ce64ed355e72fb;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=64105e4eaf31fec7aa643ff55338748fc05eb5ac;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index 64105e4ea..a03d781f6 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c @@ -218,7 +218,6 @@ * */ -#include #include @@ -404,8 +403,8 @@ static int etrax_ethernet_init(void); static int e100_open(struct net_device *dev); static int e100_set_mac_address(struct net_device *dev, void *addr); static int e100_send_packet(struct sk_buff *skb, struct net_device *dev); -static irqreturn_t e100rxtx_interrupt(int irq, void *dev_id, struct pt_regs *regs); -static irqreturn_t e100nw_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t e100rxtx_interrupt(int irq, void *dev_id); +static irqreturn_t e100nw_interrupt(int irq, void *dev_id); static void e100_rx(struct net_device *dev); static int e100_close(struct net_device *dev); static int e100_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); @@ -435,7 +434,7 @@ static void e100_reset_transceiver(struct net_device* net); static void e100_clear_network_leds(unsigned long dummy); static void e100_set_network_leds(int active); -static struct ethtool_ops e100_ethtool_ops; +static const struct ethtool_ops e100_ethtool_ops; static void broadcom_check_speed(struct net_device* dev); static void broadcom_check_duplex(struct net_device* dev); @@ -510,6 +509,8 @@ etrax_ethernet_init(void) * does not share cacheline with any other data (to avoid cache bug) */ RxDescList[i].skb = dev_alloc_skb(MAX_MEDIA_DATA_SIZE + 2 * L1_CACHE_BYTES); + if (!RxDescList[i].skb) + return -ENOMEM; RxDescList[i].descr.ctrl = 0; RxDescList[i].descr.sw_len = MAX_MEDIA_DATA_SIZE; RxDescList[i].descr.next = virt_to_phys(&RxDescList[i + 1]); @@ -672,7 +673,7 @@ e100_open(struct net_device *dev) /* allocate the irq corresponding to the receiving DMA */ if (request_irq(NETWORK_DMA_RX_IRQ_NBR, e100rxtx_interrupt, - SA_SAMPLE_RANDOM, cardname, (void *)dev)) { + IRQF_SAMPLE_RANDOM, cardname, (void *)dev)) { goto grace_exit0; } @@ -1198,7 +1199,7 @@ e100_send_packet(struct sk_buff *skb, struct net_device *dev) */ static irqreturn_t -e100rxtx_interrupt(int irq, void *dev_id, struct pt_regs * regs) +e100rxtx_interrupt(int irq, void *dev_id) { struct net_device *dev = (struct net_device *)dev_id; struct net_local *np = (struct net_local *)dev->priv; @@ -1265,7 +1266,7 @@ e100rxtx_interrupt(int irq, void *dev_id, struct pt_regs * regs) } static irqreturn_t -e100nw_interrupt(int irq, void *dev_id, struct pt_regs * regs) +e100nw_interrupt(int irq, void *dev_id) { struct net_device *dev = (struct net_device *)dev_id; struct net_local *np = (struct net_local *)dev->priv; @@ -1553,7 +1554,7 @@ static int e100_nway_reset(struct net_device *dev) return 0; } -static struct ethtool_ops e100_ethtool_ops = { +static const struct ethtool_ops e100_ethtool_ops = { .get_settings = e100_get_settings, .set_settings = e100_set_settings, .get_drvinfo = e100_get_drvinfo,