staging: comedi: Add lockdep_assert_held() calls for dev->mutex
authorIan Abbott <abbotti@mev.co.uk>
Wed, 17 Apr 2019 14:39:29 +0000 (15:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Apr 2019 12:33:41 +0000 (14:33 +0200)
commit77c21b626be5b6b30ca6f76ccd5ba1d14a8278a9
treec54dbfaf09078a152b507ef200f8fbc4da9898f8
parentf439696c81fcfe70ad46554fbec1c851bab9345a
staging: comedi: Add lockdep_assert_held() calls for dev->mutex

Lots of functions in the core comedi module expect the mutex in `struct
comedi_device` to be held, so add calls to `lockdep_assert_held()` to
check and document that.  An unusual case is the calls to
`lockdep_assert_held()` after successful return from
`comedi_alloc_board_minor()` which allocates a `struct comedi_device`
and returns with its mutex locked.

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