Re: [PATCH 01/10] usb-serial: URB write locking macros.
From: Eduardo Pereira Habkost
Date: Tue Dec 06 2005 - 07:41:41 EST
On Tue, Dec 06, 2005 at 01:24:03PM +0100, Arjan van de Ven wrote:
> On Tue, 2005-12-06 at 09:57 -0200, Luiz Fernando Capitulino wrote:
> > Introduces URB write locking macros.
>
> ugh.. WHY ?
Maybe we need a better description for the patch: the locking is already
there (the 'lock' field in struct sub_serial_port), and there is no
change of behaviour, just replacing a (spin_lock_t, int) by an atomic_t.
The purpose of the changes is removing the spinlock, because it is used
only to protect write_urb_busy, and if someday we need locking on other
parts, we already have a semaphore (introduced by Capitulino some time
ago, to fix a open()/close() race condition).
--
Eduardo
Attachment:
pgp00000.pgp
Description: PGP signature