From: Julian Wiedmann Date: Wed, 12 May 2021 14:10:54 +0000 (+0200) Subject: driver core: replace open-coded device_lock_assert() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8c60a14104e8e85f08b855e62ee8fe6947da2870;p=linux.git 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 Link: https://lore.kernel.org/r/20210512141054.2180373-1-jwi@linux.ibm.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/core.c b/drivers/base/core.c index 4a8bf8cda52bc..bfa3536d48dff 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -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;