mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
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>
This commit is contained in:
parent
77c21b626b
commit
f44303e852
@ -159,6 +159,7 @@ static void comedi_device_detach_cleanup(struct comedi_device *dev)
|
||||
int i;
|
||||
struct comedi_subdevice *s;
|
||||
|
||||
lockdep_assert_held(&dev->attach_lock);
|
||||
lockdep_assert_held(&dev->mutex);
|
||||
if (dev->subdevices) {
|
||||
for (i = 0; i < dev->n_subdevices; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user