driver core: replace open-coded device_lock_assert()

Using the right wrapper makes it easier to associate this assert
statement with the device_[un]lock() helpers.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Link: https://lore.kernel.org/r/20210512141054.2180373-1-jwi@linux.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Julian Wiedmann 2021-05-12 16:10:54 +02:00 committed by Greg Kroah-Hartman
parent d616f56d34
commit 8c60a14104
1 changed files with 1 additions and 1 deletions

View File

@ -3437,7 +3437,7 @@ bool kill_device(struct device *dev)
* to run while we are tearing out the bus/class/sysfs from
* underneath the device.
*/
lockdep_assert_held(&dev->mutex);
device_lock_assert(dev);
if (dev->p->dead)
return false;