static void
 ax_mii_ei_outbits(struct net_device *dev, unsigned int bits, int len)
 {
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        void __iomem *memr_addr = (void __iomem *)dev->base_addr + AX_MEMR;
        unsigned int memr;
 
 static unsigned int
 ax_phy_ei_inbits(struct net_device *dev, int no)
 {
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        void __iomem *memr_addr = (void __iomem *)dev->base_addr + AX_MEMR;
        unsigned int memr;
        unsigned int result = 0;
 static int
 ax_phy_read(struct net_device *dev, int phy_addr, int reg)
 {
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        unsigned long flags;
        unsigned int result;
 
 static void
 ax_phy_write(struct net_device *dev, int phy_addr, int reg, int value)
 {
-       struct ei_device *ei = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei = netdev_priv(dev);
        struct ax_device  *ax = to_ax_dev(dev);
        unsigned long flags;
 
 
        platform_set_drvdata(pdev, NULL);
 
        unregister_netdev(ndev);
-       dm9000_release_board(pdev, (board_info_t *) netdev_priv(ndev));
+       dm9000_release_board(pdev, netdev_priv(ndev));
        free_netdev(ndev);              /* free device structure */
 
        dev_dbg(&pdev->dev, "released and freed device\n");
 
        }
        veth_dev[i] = dev;
 
-       port = (struct veth_port*)netdev_priv(dev);
+       port = netdev_priv(dev);
 
        /* Start the state machine on each connection on this vlan. If we're
         * the first dev to do so this will commence link negotiation */
 
 static int __ei_open(struct net_device *dev)
 {
        unsigned long flags;
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
 
        if (dev->watchdog_timeo <= 0)
                 dev->watchdog_timeo = TX_TIMEOUT;
  */
 static int __ei_close(struct net_device *dev)
 {
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        unsigned long flags;
 
        /*
 static void __ei_tx_timeout(struct net_device *dev)
 {
        unsigned long e8390_base = dev->base_addr;
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        int txsr, isr, tickssofar = jiffies - dev_trans_start(dev);
        unsigned long flags;
 
                                   struct net_device *dev)
 {
        unsigned long e8390_base = dev->base_addr;
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        int send_length = skb->len, output_page;
        unsigned long flags;
        char buf[ETH_ZLEN];
 static void ei_tx_intr(struct net_device *dev)
 {
        unsigned long e8390_base = dev->base_addr;
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        int status = ei_inb(e8390_base + EN0_TSR);
 
        ei_outb_p(ENISR_TX, e8390_base + EN0_ISR); /* Ack intr. */
 static void ei_receive(struct net_device *dev)
 {
        unsigned long e8390_base = dev->base_addr;
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        unsigned char rxing_page, this_frame, next_frame;
        unsigned short current_offset;
        int rx_pkt_count = 0;
 static struct net_device_stats *__ei_get_stats(struct net_device *dev)
 {
        unsigned long ioaddr = dev->base_addr;
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        unsigned long flags;
 
        /* If the card is stopped, just return the present stats. */
 {
        unsigned long e8390_base = dev->base_addr;
        int i;
-       struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
 
        if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI)))
        {
 static void __ei_set_multicast_list(struct net_device *dev)
 {
        unsigned long flags;
-       struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
 
        spin_lock_irqsave(&ei_local->page_lock, flags);
        do_set_multicast_list(dev);
 
 static void ethdev_setup(struct net_device *dev)
 {
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        if (ei_debug > 1)
                printk(version);
 
 static void __NS8390_init(struct net_device *dev, int startp)
 {
        unsigned long e8390_base = dev->base_addr;
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        int i;
        int endcfg = ei_local->word16
            ? (0x48 | ENDCFG_WTS | (ei_local->bigendian ? ENDCFG_BOS : 0))
                                                                int start_page)
 {
        unsigned long e8390_base = dev->base_addr;
-       struct ei_device *ei_local __attribute((unused)) = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local __attribute((unused)) = netdev_priv(dev);
 
        ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD);
 
 
 
 static int __init init_reg_offset(struct net_device *dev,unsigned long base_addr)
 {
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        int i;
        unsigned char bus_width;
 
        int start_page, stop_page;
        int reg0, ret;
        static unsigned version_printed;
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        unsigned char bus_width;
 
        if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME))
 static void ne_reset_8390(struct net_device *dev)
 {
        unsigned long reset_start_time = jiffies;
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
 
        if (ei_debug > 1)
                printk(KERN_DEBUG "resetting the 8390 t=%ld...", jiffies);
 
 static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
 {
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        /* This *shouldn't* happen. If it does, it's the last thing you'll see */
 
        if (ei_status.dmaing)
 
 static void ne_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset)
 {
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
 #ifdef NE_SANITY_CHECK
        int xfer_count = count;
 #endif
 static void ne_block_output(struct net_device *dev, int count,
                const unsigned char *buf, const int start_page)
 {
-       struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+       struct ei_device *ei_local = netdev_priv(dev);
        unsigned long dma_start;
 #ifdef NE_SANITY_CHECK
        int retries = 0;
 
  */
 static int xemaclite_set_mac_address(struct net_device *dev, void *address)
 {
-       struct net_local *lp = (struct net_local *) netdev_priv(dev);
+       struct net_local *lp = netdev_priv(dev);
        struct sockaddr *addr = address;
 
        if (netif_running(dev))
  */
 static void xemaclite_tx_timeout(struct net_device *dev)
 {
-       struct net_local *lp = (struct net_local *) netdev_priv(dev);
+       struct net_local *lp = netdev_priv(dev);
        unsigned long flags;
 
        dev_err(&lp->ndev->dev, "Exceeded transmit timeout of %lu ms\n",
  */
 static void xemaclite_tx_handler(struct net_device *dev)
 {
-       struct net_local *lp = (struct net_local *) netdev_priv(dev);
+       struct net_local *lp = netdev_priv(dev);
 
        dev->stats.tx_packets++;
        if (lp->deferred_skb) {
  */
 static void xemaclite_rx_handler(struct net_device *dev)
 {
-       struct net_local *lp = (struct net_local *) netdev_priv(dev);
+       struct net_local *lp = netdev_priv(dev);
        struct sk_buff *skb;
        unsigned int align;
        u32 len;
 {
        bool tx_complete = 0;
        struct net_device *dev = dev_id;
-       struct net_local *lp = (struct net_local *) netdev_priv(dev);
+       struct net_local *lp = netdev_priv(dev);
        void __iomem *base_addr = lp->base_addr;
        u32 tx_status;
 
  */
 static int xemaclite_open(struct net_device *dev)
 {
-       struct net_local *lp = (struct net_local *) netdev_priv(dev);
+       struct net_local *lp = netdev_priv(dev);
        int retval;
 
        /* Just to be safe, stop the device first */
  */
 static int xemaclite_close(struct net_device *dev)
 {
-       struct net_local *lp = (struct net_local *) netdev_priv(dev);
+       struct net_local *lp = netdev_priv(dev);
 
        netif_stop_queue(dev);
        xemaclite_disable_interrupts(lp);
  */
 static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
 {
-       struct net_local *lp = (struct net_local *) netdev_priv(dev);
+       struct net_local *lp = netdev_priv(dev);
        struct sk_buff *new_skb;
        unsigned int len;
        unsigned long flags;
 static void xemaclite_remove_ndev(struct net_device *ndev)
 {
        if (ndev) {
-               struct net_local *lp = (struct net_local *) netdev_priv(ndev);
+               struct net_local *lp = netdev_priv(ndev);
 
                if (lp->base_addr)
                        iounmap((void __iomem __force *) (lp->base_addr));
        struct device *dev = &of_dev->dev;
        struct net_device *ndev = dev_get_drvdata(dev);
 
-       struct net_local *lp = (struct net_local *) netdev_priv(ndev);
+       struct net_local *lp = netdev_priv(ndev);
 
        /* Un-register the mii_bus, if configured */
        if (lp->has_mdio) {