]> git.baikalelectronics.ru Git - kernel.git/commit
CAPI: Rework controller state notifier
authorJan Kiszka <jan.kiszka@web.de>
Mon, 8 Feb 2010 10:12:13 +0000 (10:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2010 00:01:21 +0000 (16:01 -0800)
commit4f1da46cda7ca25c0e7b6f70837b3c41e8794b0a
treead309906a7b20b0b13b573abfb3be9d524f08086
parent16f602895df0eb37466719e2f7d178d9eef14b2d
CAPI: Rework controller state notifier

Another step towards proper locking: Rework the callback provided to
capidrv for controller state changes. This is so far attached to an
application, which would require us to hold the corresponding lock
across notification calls.

But there is no direct relation between a controller up/down event and
an application, so let's decouple them and provide a notifier call chain
for those events instead. This notifier chain is first of all used
internally. Here we request the highest priority to unsure that
housekeeping work is done before any other notifications. The chain is
exported via [un]register_capictr_notifier to our only user, capidrv, to
replace the racy and unfixable capi20_set_callback.

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