aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/6pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/hamradio/6pack.c')
-rw-r--r--drivers/net/hamradio/6pack.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 913a56406594..155160052c8b 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -398,14 +398,13 @@ static DEFINE_RWLOCK(disc_data_lock);
398 398
399static struct sixpack *sp_get(struct tty_struct *tty) 399static struct sixpack *sp_get(struct tty_struct *tty)
400{ 400{
401 unsigned long flags;
402 struct sixpack *sp; 401 struct sixpack *sp;
403 402
404 read_lock_irqsave(&disc_data_lock, flags); 403 read_lock(&disc_data_lock);
405 sp = tty->disc_data; 404 sp = tty->disc_data;
406 if (sp) 405 if (sp)
407 atomic_inc(&sp->refcnt); 406 atomic_inc(&sp->refcnt);
408 read_unlock_irqrestore(&disc_data_lock, flags); 407 read_unlock(&disc_data_lock);
409 408
410 return sp; 409 return sp;
411} 410}
@@ -689,13 +688,12 @@ out:
689 */ 688 */
690static void sixpack_close(struct tty_struct *tty) 689static void sixpack_close(struct tty_struct *tty)
691{ 690{
692 unsigned long flags;
693 struct sixpack *sp; 691 struct sixpack *sp;
694 692
695 write_lock_irqsave(&disc_data_lock, flags); 693 write_lock(&disc_data_lock);
696 sp = tty->disc_data; 694 sp = tty->disc_data;
697 tty->disc_data = NULL; 695 tty->disc_data = NULL;
698 write_unlock_irqrestore(&disc_data_lock, flags); 696 write_unlock(&disc_data_lock);
699 if (!sp) 697 if (!sp)
700 return; 698 return;
701 699