History

device-core: Kill the lockdep_mutex

Per Peter [1], the lockdep API has native support for all the use cases lockdep_mutex was attempting to enable. Now that all lockdep_mutex users have been converted to those APIs, drop this lock.

Dan Williams committed 4 years ago

Commit fd3abd21 parent 81beea52 files · +0 −8Browse files

Unified · Split

2 files
  1. drivers/base/core.c +0 −3
  2. include/linux/device.h +0 −5
drivers/base/core.c+0−3
@@ -2864,9 +2864,6 @@ void device_initialize(struct device *dev) · 2863 unmodified lines
2864 kobject_init(&dev->kobj, &device_ktype);2864 kobject_init(&dev->kobj, &device_ktype);
2865 INIT_LIST_HEAD(&dev->dma_pools);2865 INIT_LIST_HEAD(&dev->dma_pools);
2866 mutex_init(&dev->mutex);2866 mutex_init(&dev->mutex);
2867#ifdef CONFIG_PROVE_LOCKING
2868 mutex_init(&dev->lockdep_mutex);
2869#endif
2870 lockdep_set_novalidate_class(&dev->mutex);2867 lockdep_set_novalidate_class(&dev->mutex);
2871 spin_lock_init(&dev->devres_lock);2868 spin_lock_init(&dev->devres_lock);
2872 INIT_LIST_HEAD(&dev->devres_head);2869 INIT_LIST_HEAD(&dev->devres_head);
include/linux/device.h+0−5
@@ -400,8 +400,6 @@ struct dev_msi_info { · 399 unmodified lines
400 * This identifies the device type and carries type-specific400 * This identifies the device type and carries type-specific
401 * information.401 * information.
402 * @mutex: Mutex to synchronize calls to its driver.402 * @mutex: Mutex to synchronize calls to its driver.
403 * @lockdep_mutex: An optional debug lock that a subsystem can use as a
404 * peer lock to gain localized lockdep coverage of the device_lock.
405 * @bus: Type of bus device is on.403 * @bus: Type of bus device is on.
406 * @driver: Which driver has allocated this404 * @driver: Which driver has allocated this
407 * @platform_data: Platform data specific to the device.405 * @platform_data: Platform data specific to the device.
@@ -499,9 +497,6 @@ struct device { · 91 unmodified lines
499 core doesn't touch it */497 core doesn't touch it */
500 void *driver_data; /* Driver data, set and get with498 void *driver_data; /* Driver data, set and get with
501 dev_set_drvdata/dev_get_drvdata */499 dev_set_drvdata/dev_get_drvdata */
502#ifdef CONFIG_PROVE_LOCKING
503 struct mutex lockdep_mutex;
504#endif
505 struct mutex mutex; /* mutex to synchronize calls to500 struct mutex mutex; /* mutex to synchronize calls to
506 * its driver.501 * its driver.
507 */502 */