include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / net / irda / sir_dev.c
index d940809..de91cd1 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
+#include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 
@@ -582,7 +583,8 @@ EXPORT_SYMBOL(sirdev_receive);
 
 /* callbacks from network layer */
 
-static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t sirdev_hard_xmit(struct sk_buff *skb,
+                                         struct net_device *ndev)
 {
        struct sir_dev *dev = netdev_priv(ndev);
        unsigned long flags;
@@ -590,7 +592,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
        int err;
        s32 speed;
 
-       IRDA_ASSERT(dev != NULL, return 0;);
+       IRDA_ASSERT(dev != NULL, return NETDEV_TX_OK;);
 
        netif_stop_queue(ndev);
 
@@ -607,7 +609,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
                                 * stopped so the network layer will retry after the
                                 * fsm completes and wakes the queue.
                                 */
-                                return 1;
+                                return NETDEV_TX_BUSY;
                        }
                        else if (unlikely(err)) {
                                /* other fatal error - forget the speed change and
@@ -621,7 +623,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
                         */
 
                        dev_kfree_skb_any(skb);
-                       return 0;
+                       return NETDEV_TX_OK;
                } else
                        dev->new_speed = speed;
        }
@@ -668,7 +670,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
        }
        spin_unlock_irqrestore(&dev->tx_lock, flags);
 
-       return 0;
+       return NETDEV_TX_OK;
 }
 
 /* called from network layer with rtnl hold */