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
28642864 kobject_init(&dev->kobj, &device_ktype);
28652865 INIT_LIST_HEAD(&dev->dma_pools);
28662866 mutex_init(&dev->mutex);
2867−#ifdef CONFIG_PROVE_LOCKING
2868− mutex_init(&dev->lockdep_mutex);
2869−#endif
28702867 lockdep_set_novalidate_class(&dev->mutex);
28712868 spin_lock_init(&dev->devres_lock);
28722869 INIT_LIST_HEAD(&dev->devres_head);
include/linux/device.h+0−5
@@ -400,8 +400,6 @@ struct dev_msi_info { · 399 unmodified lines
400400 * This identifies the device type and carries type-specific
401401 * information.
402402 * @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.
405403 * @bus: Type of bus device is on.
406404 * @driver: Which driver has allocated this
407405 * @platform_data: Platform data specific to the device.
@@ -499,9 +497,6 @@ struct device { · 91 unmodified lines
499497 core doesn't touch it */
500498 void *driver_data; /* Driver data, set and get with
501499 dev_set_drvdata/dev_get_drvdata */
502−#ifdef CONFIG_PROVE_LOCKING
503− struct mutex lockdep_mutex;
504−#endif
505500 struct mutex mutex; /* mutex to synchronize calls to
506501 * its driver.
507502 */