]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: Add lockdep_assert_held() calls for dev->attach_lock
authorIan Abbott <abbotti@mev.co.uk>
Wed, 17 Apr 2019 14:39:30 +0000 (15:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Apr 2019 12:33:41 +0000 (14:33 +0200)
commit8131304896d64b6e01d3aed67d10dbae2e501199
treee907ba625817cfe87abb9733537d50ec147c0679
parent44e7b51f0fc32ae01b7a17371e164d31e00a498a
staging: comedi: Add lockdep_assert_held() calls for dev->attach_lock

There are not a lot of functions in the core comedi module that require
the R/W semaphore `attach_lock` in `struct comedi_device` to be locked
(although there are a few functions that require at least one of
`attach_lock` and `mutex` to be locked).  One function that requires the
caller to lock `attach_lock` is `comedi_device_detach_cleanup()` so add
a call to `lockdep_assert_held()` to check and document that.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers.c