]> git.baikalelectronics.ru Git - kernel.git/commit
CAPI: Rework locking of capidev members
authorJan Kiszka <jan.kiszka@web.de>
Mon, 8 Feb 2010 10:12:19 +0000 (10:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2010 00:01:24 +0000 (16:01 -0800)
commit3b6bc6e6bc629b0d957b3e2ee640477169966caa
tree3a62d3e63ab2a7f2c0033cc301ed5f1693ca7270
parent98fd78feac2d8dfefe84d77255c89aa57e16ed5e
CAPI: Rework locking of capidev members

Rename 'ncci_list_mtx' to 'lock', expressing that it now protects a
larger set of capidev members: the NCCI list, ap.applid (ie. the
registration of the application), and modifications of userflags.

We do not need to protect each and every check for ap.applid because,
once an application is registered, it will stay for the whole lifetime
of the device.

Also, there is no need to apply the capidev mutex during release (if
there could be concurrent users, we would crash them anyway by freeing
the device at the end of capi_release).

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/capi/capi.c