Skip to contentSkip to conversation

driver core: replace open-coded device_lock_assert()

PATCH New Julian Wiedmann 1 participant 1 message May 12, 2021 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/core.c +1 -1
index 4a8bf8cda52b..bfa3536d48df 100644
@@ -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;
Signature · 1 line
2.25.1