diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-01-09 01:31:04 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-09 17:16:21 -0500 |
commit | c1854ebc7f13b23c3d6a6e641a1a1db1116ca998 (patch) | |
tree | f6ddfa2532700ef5907d6153c01a06b5c8f4596d /drivers/net/hamradio/mkiss.c | |
parent | 09a626600b437d91f6b13ade5c7c4b374893c54e (diff) |
[AX25] mkiss: Drop spinlock before sleeping call.
With the previous missing-unlock fix the spinlock is dropped only
after the tty->driver->write() call which might sleep.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio/mkiss.c')
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index 41b3d83c2ab8..f4424cf886c5 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -515,6 +515,7 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len) | |||
515 | count = kiss_esc(p, (unsigned char *)ax->xbuff, len); | 515 | count = kiss_esc(p, (unsigned char *)ax->xbuff, len); |
516 | } | 516 | } |
517 | } | 517 | } |
518 | spin_unlock_bh(&ax->buflock); | ||
518 | 519 | ||
519 | set_bit(TTY_DO_WRITE_WAKEUP, &ax->tty->flags); | 520 | set_bit(TTY_DO_WRITE_WAKEUP, &ax->tty->flags); |
520 | actual = ax->tty->driver->write(ax->tty, ax->xbuff, count); | 521 | actual = ax->tty->driver->write(ax->tty, ax->xbuff, count); |
@@ -524,7 +525,6 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len) | |||
524 | ax->dev->trans_start = jiffies; | 525 | ax->dev->trans_start = jiffies; |
525 | ax->xleft = count - actual; | 526 | ax->xleft = count - actual; |
526 | ax->xhead = ax->xbuff + actual; | 527 | ax->xhead = ax->xbuff + actual; |
527 | spin_unlock_bh(&ax->buflock); | ||
528 | } | 528 | } |
529 | 529 | ||
530 | /* Encapsulate an AX.25 packet and kick it into a TTY queue. */ | 530 | /* Encapsulate an AX.25 packet and kick it into a TTY queue. */ |