Skip to content

Commit

Permalink
ACPI / dock: Drop the hp_lock mutex from struct dock_station
Browse files Browse the repository at this point in the history
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.wysocki@intel.com>
  • Loading branch information
Rafael J. Wysocki committed Jul 14, 2013
1 parent ecd046d commit d460ace
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ struct dock_station {
acpi_handle handle;
unsigned long last_dock_time;
u32 flags;
struct mutex hp_lock;
struct list_head dependent_devices;

struct list_head sibling;
Expand Down Expand Up @@ -351,8 +350,6 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event)
{
struct dock_dependent_device *dd;

mutex_lock(&ds->hp_lock);

/*
* First call driver specific hotplug functions
*/
Expand All @@ -371,7 +368,6 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event)
else
dock_create_acpi_device(dd->handle);
}
mutex_unlock(&ds->hp_lock);
}

static void dock_event(struct dock_station *ds, u32 event, int num)
Expand Down Expand Up @@ -893,7 +889,6 @@ static int __init dock_add(acpi_handle handle)
dock_station->dock_device = dd;
dock_station->last_dock_time = jiffies - HZ;

mutex_init(&dock_station->hp_lock);
INIT_LIST_HEAD(&dock_station->sibling);
INIT_LIST_HEAD(&dock_station->dependent_devices);

Expand Down

0 comments on commit d460ace

Please sign in to comment.