Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[safe/jmp/linux-2.6] / drivers / char / synclink.c
index afded3a..0658fc5 100644 (file)
@@ -81,6 +81,7 @@
 #include <linux/mm.h>
 #include <linux/seq_file.h>
 #include <linux/slab.h>
+#include <linux/smp_lock.h>
 #include <linux/delay.h>
 #include <linux/netdevice.h>
 #include <linux/vmalloc.h>
@@ -2030,7 +2031,7 @@ static int mgsl_put_char(struct tty_struct *tty, unsigned char ch)
        if (mgsl_paranoia_check(info, tty->name, "mgsl_put_char"))
                return 0;
 
-       if (!tty || !info->xmit_buf)
+       if (!info->xmit_buf)
                return 0;
 
        spin_lock_irqsave(&info->irq_spinlock, flags);
@@ -2120,7 +2121,7 @@ static int mgsl_write(struct tty_struct * tty,
        if (mgsl_paranoia_check(info, tty->name, "mgsl_write"))
                goto cleanup;
 
-       if (!tty || !info->xmit_buf)
+       if (!info->xmit_buf)
                goto cleanup;
 
        if ( info->params.mode == MGSL_MODE_HDLC ||
@@ -7696,10 +7697,9 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
  *
  * skb  socket buffer containing HDLC frame
  * dev  pointer to network device structure
- *
- * returns 0 if success, otherwise error code
  */
-static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
+                                     struct net_device *dev)
 {
        struct mgsl_struct *info = dev_to_port(dev);
        unsigned long flags;
@@ -7730,7 +7730,7 @@ static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
                usc_start_transmitter(info);
        spin_unlock_irqrestore(&info->irq_spinlock,flags);
 
-       return 0;
+       return NETDEV_TX_OK;
 }
 
 /**