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 коммит произвёл Greg Kroah-Hartman
Родитель d616f56d34
Коммит 8c60a14104
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;