Messages in this thread | | | Date | Thu, 23 Feb 2012 13:37:12 +0100 | From | Jiri Slaby <> | Subject | Re: [PATCH] tty: the briq panel isn't a tty, make it use its own locking |
| |
On 02/23/2012 01:34 PM, Alan Cox wrote: > --- a/drivers/char/briq_panel.c > +++ b/drivers/char/briq_panel.c ... > @@ -66,37 +67,28 @@ static void set_led(char state) > > static int briq_panel_open(struct inode *ino, struct file *filep) > { > - tty_lock(); > - /* enforce single access, vfd_is_open is protected by BKL */ > - if (vfd_is_open) { > + /* enforce single open */ > + if (test_and_set_bit(0, &vfd_is_open)) { > tty_unlock();
This one should be removed too.
> return -EBUSY; > } > - vfd_is_open = 1; > - > - tty_unlock(); > return 0; > }
thanks, -- js suse labs
| |