From: Albert H. <he...@us...> - 2009-03-02 18:45:46
|
Update of /cvsroot/gc-linux/linux/drivers/net In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2123/drivers/net Modified Files: gcn-bba.c Log Message: [PATCH] gcn-bba: safe convert to netdev_priv() From: Albert Herranz <alb...@ya...> Date: Sun, 1 Mar 2009 23:37:56 +0100 Subject: [PATCH] gcn-bba: safe convert to netdev_priv() Idem as "netdevice: safe convert to netdev_priv()". Signed-off-by: Albert Herranz <alb...@ya...> Index: gcn-bba.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/gcn-bba.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** gcn-bba.c 1 Feb 2009 18:29:35 -0000 1.16 --- gcn-bba.c 2 Mar 2009 18:45:43 -0000 1.17 *************** *** 389,393 **** static int bba_open(struct net_device *dev) { ! struct bba_private *priv = (struct bba_private *)dev->priv; int retval; --- 389,393 ---- static int bba_open(struct net_device *dev) { ! struct bba_private *priv = netdev_priv(dev); int retval; *************** *** 420,424 **** static int bba_close(struct net_device *dev) { ! struct bba_private *priv = (struct bba_private *)dev->priv; /* do not allow more packets to be queued */ --- 420,424 ---- static int bba_close(struct net_device *dev) { ! struct bba_private *priv = netdev_priv(dev); /* do not allow more packets to be queued */ *************** *** 448,452 **** static struct net_device_stats *bba_get_stats(struct net_device *dev) { ! struct bba_private *priv = (struct bba_private *)dev->priv; return &priv->stats; --- 448,452 ---- static struct net_device_stats *bba_get_stats(struct net_device *dev) { ! struct bba_private *priv = netdev_priv(dev); return &priv->stats; *************** *** 459,463 **** static int bba_start_xmit(struct sk_buff *skb, struct net_device *dev) { ! struct bba_private *priv = (struct bba_private *)dev->priv; unsigned long flags; int retval = NETDEV_TX_OK; --- 459,463 ---- static int bba_start_xmit(struct sk_buff *skb, struct net_device *dev) { ! struct bba_private *priv = netdev_priv(dev); unsigned long flags; int retval = NETDEV_TX_OK; *************** *** 500,504 **** static int bba_tx_err(u8 status, struct net_device *dev) { ! struct bba_private *priv = (struct bba_private *)dev->priv; int last_tx_errors = priv->stats.tx_errors; --- 500,504 ---- static int bba_tx_err(u8 status, struct net_device *dev) { ! struct bba_private *priv = netdev_priv(dev); int last_tx_errors = priv->stats.tx_errors; *************** *** 537,541 **** static int bba_tx(struct net_device *dev) { ! struct bba_private *priv = (struct bba_private *)dev->priv; struct sk_buff *skb; unsigned long flags; --- 537,541 ---- static int bba_tx(struct net_device *dev) { ! struct bba_private *priv = netdev_priv(dev); struct sk_buff *skb; unsigned long flags; *************** *** 597,601 **** static int bba_rx_err(u8 status, struct net_device *dev) { ! struct bba_private *priv = (struct bba_private *)dev->priv; int last_rx_errors = priv->stats.rx_errors; --- 597,601 ---- static int bba_rx_err(u8 status, struct net_device *dev) { ! struct bba_private *priv = netdev_priv(dev); int last_rx_errors = priv->stats.rx_errors; *************** *** 646,650 **** static int bba_rx(struct net_device *dev, int budget) { ! struct bba_private *priv = (struct bba_private *)dev->priv; struct sk_buff *skb; struct bba_descr descr; --- 646,650 ---- static int bba_rx(struct net_device *dev, int budget) { ! struct bba_private *priv = netdev_priv(dev); struct sk_buff *skb; struct bba_descr descr; *************** *** 780,784 **** static void bba_interrupt(struct net_device *dev) { ! struct bba_private *priv = (struct bba_private *)dev->priv; u8 ir, imr, status, lrps, ltps; int loops = 0; --- 780,784 ---- static void bba_interrupt(struct net_device *dev) { ! struct bba_private *priv = netdev_priv(dev); u8 ir, imr, status, lrps, ltps; int loops = 0; *************** *** 864,868 **** static void bba_reset_hardware(struct net_device *dev) { ! struct bba_private *priv = (struct bba_private *)dev->priv; /* unknown, mx register 0x60 */ --- 864,868 ---- static void bba_reset_hardware(struct net_device *dev) { ! struct bba_private *priv = netdev_priv(dev); /* unknown, mx register 0x60 */ *************** *** 988,992 **** { struct net_device *dev = (struct net_device *)dev0; ! struct bba_private *priv = (struct bba_private *)dev->priv; register u8 status, mask; --- 988,992 ---- { struct net_device *dev = (struct net_device *)dev0; ! struct bba_private *priv = netdev_priv(dev); register u8 status, mask; *************** *** 1065,1069 **** static inline void bba_select(void) { ! struct bba_private *priv = (struct bba_private *)bba_dev->priv; exi_dev_select(priv->exi_device); --- 1065,1069 ---- static inline void bba_select(void) { ! struct bba_private *priv = netdev_priv(bba_dev); exi_dev_select(priv->exi_device); *************** *** 1072,1076 **** static inline void bba_deselect(void) { ! struct bba_private *priv = (struct bba_private *)bba_dev->priv; exi_dev_deselect(priv->exi_device); } --- 1072,1076 ---- static inline void bba_deselect(void) { ! struct bba_private *priv = netdev_priv(bba_dev); exi_dev_deselect(priv->exi_device); } *************** *** 1078,1082 **** static inline void bba_read(void *data, size_t len) { ! struct bba_private *priv = (struct bba_private *)bba_dev->priv; return exi_dev_read(priv->exi_device, data, len); } --- 1078,1082 ---- static inline void bba_read(void *data, size_t len) { ! struct bba_private *priv = netdev_priv(bba_dev); return exi_dev_read(priv->exi_device, data, len); } *************** *** 1084,1088 **** static inline void bba_write(void *data, size_t len) { ! struct bba_private *priv = (struct bba_private *)bba_dev->priv; return exi_dev_write(priv->exi_device, data, len); } --- 1084,1088 ---- static inline void bba_write(void *data, size_t len) { ! struct bba_private *priv = netdev_priv(bba_dev); return exi_dev_write(priv->exi_device, data, len); } *************** *** 1175,1179 **** if (dev) { ! priv = (struct bba_private *)dev->priv; kthread_stop(priv->io_thread); --- 1175,1179 ---- if (dev) { ! priv = netdev_priv(dev); kthread_stop(priv->io_thread); |