mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
driver core: Provide an wrapper around the mutex to do lockdep warnings
Instead of open-coding it in drivers that want to double check that their functions are indeed holding the device lock. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Suggested-by: David Vrabel <david.vrabel@citrix.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
This commit is contained in:
parent
e8801a7418
commit
ac8010221d
2 changed files with 6 additions and 1 deletions
|
@ -911,6 +911,11 @@ static inline void device_unlock(struct device *dev)
|
|||
mutex_unlock(&dev->mutex);
|
||||
}
|
||||
|
||||
static inline void device_lock_assert(struct device *dev)
|
||||
{
|
||||
lockdep_assert_held(&dev->mutex);
|
||||
}
|
||||
|
||||
void driver_init(void);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue