]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/hamradio/6pack.c
PCIE: check and return bus_register errors
[linux-2.6-omap-h63xx.git] / drivers / net / hamradio / 6pack.c
index 90999867a32c56fd6819acee43ef1934984b061d..86b3bb9bec2d38727922fda410b58f73f9019fde 100644 (file)
@@ -12,7 +12,6 @@
  *             Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -308,9 +307,9 @@ static int sp_set_mac_address(struct net_device *dev, void *addr)
 {
        struct sockaddr_ax25 *sa = addr;
 
-       spin_lock_irq(&dev->xmit_lock);
+       netif_tx_lock_bh(dev);
        memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN);
-       spin_unlock_irq(&dev->xmit_lock);
+       netif_tx_unlock_bh(dev);
 
        return 0;
 }
@@ -456,11 +455,6 @@ out:
 
 /* ----------------------------------------------------------------------- */
 
-static int sixpack_receive_room(struct tty_struct *tty)
-{
-       return 65536;  /* We can handle an infinite amount of data. :-) */
-}
-
 /*
  * Handle the 'receiver data ready' interrupt.
  * This function is called by the 'tty_io' module in the kernel when
@@ -671,6 +665,7 @@ static int sixpack_open(struct tty_struct *tty)
 
        /* Done.  We have linked the TTY line to a channel. */
        tty->disc_data = sp;
+       tty->receive_room = 65536;
 
        /* Now we're ready to register. */
        if (register_netdev(dev))
@@ -771,9 +766,9 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file,
                        break;
                }
 
-               spin_lock_irq(&dev->xmit_lock);
+               netif_tx_lock_bh(dev);
                memcpy(dev->dev_addr, &addr, AX25_ADDR_LEN);
-               spin_unlock_irq(&dev->xmit_lock);
+               netif_tx_unlock_bh(dev);
 
                err = 0;
                break;
@@ -802,7 +797,6 @@ static struct tty_ldisc sp_ldisc = {
        .close          = sixpack_close,
        .ioctl          = sixpack_ioctl,
        .receive_buf    = sixpack_receive_buf,
-       .receive_room   = sixpack_receive_room,
        .write_wakeup   = sixpack_write_wakeup,
 };