From: Rafael J. Wysocki <rafael.j.wyso...@intel.com> The only existing user of the hp_lock mutex in struct dock_station, hotplug_dock_devices(), is always called under acpi_scan_lock and cannot race with another instance of itself, so drop the mutex which is not necessary.
Signed-off-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> --- drivers/acpi/dock.c | 5 ----- 1 file changed, 5 deletions(-) Index: linux-pm/drivers/acpi/dock.c =================================================================== --- linux-pm.orig/drivers/acpi/dock.c +++ linux-pm/drivers/acpi/dock.c @@ -64,7 +64,6 @@ struct dock_station { unsigned long last_dock_time; u32 flags; spinlock_t dd_lock; - struct mutex hp_lock; struct list_head dependent_devices; struct list_head sibling; @@ -410,8 +409,6 @@ static void hotplug_dock_devices(struct { struct dock_dependent_device *dd; - mutex_lock(&ds->hp_lock); - /* * First call driver specific hotplug functions */ @@ -430,7 +427,6 @@ static void hotplug_dock_devices(struct else dock_create_acpi_device(dd->handle); } - mutex_unlock(&ds->hp_lock); } static void dock_event(struct dock_station *ds, u32 event, int num) @@ -1004,7 +1000,6 @@ static int __init dock_add(acpi_handle h dock_station->dock_device = dd; dock_station->last_dock_time = jiffies - HZ; - mutex_init(&dock_station->hp_lock); spin_lock_init(&dock_station->dd_lock); INIT_LIST_HEAD(&dock_station->sibling); ATOMIC_INIT_NOTIFIER_HEAD(&dock_notifier_list); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/