diff options
author | Len Brown <len.brown@intel.com> | 2006-12-16 01:01:18 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-16 01:01:18 -0500 |
commit | cfee47f99bc14a6d7c6b0be2284db2cef310a815 (patch) | |
tree | 2974594b06534c199ea9c4b39492d5a708bb539a /drivers/acpi/dock.c | |
parent | 7e244322cd4ea361ef9ee623b3fcb4d9f4ff841c (diff) | |
parent | 9185cfa92507d07ac787bc73d06c42222eec7239 (diff) |
Pull bugfix into test branch
Conflicts:
kernel/power/disk.c
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r-- | drivers/acpi/dock.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 215f5b30a1f1..54ce12ab43d7 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -48,7 +48,7 @@ struct dock_station { | |||
48 | unsigned long last_dock_time; | 48 | unsigned long last_dock_time; |
49 | u32 flags; | 49 | u32 flags; |
50 | spinlock_t dd_lock; | 50 | spinlock_t dd_lock; |
51 | spinlock_t hp_lock; | 51 | struct mutex hp_lock; |
52 | struct list_head dependent_devices; | 52 | struct list_head dependent_devices; |
53 | struct list_head hotplug_devices; | 53 | struct list_head hotplug_devices; |
54 | }; | 54 | }; |
@@ -118,9 +118,9 @@ static void | |||
118 | dock_add_hotplug_device(struct dock_station *ds, | 118 | dock_add_hotplug_device(struct dock_station *ds, |
119 | struct dock_dependent_device *dd) | 119 | struct dock_dependent_device *dd) |
120 | { | 120 | { |
121 | spin_lock(&ds->hp_lock); | 121 | mutex_lock(&ds->hp_lock); |
122 | list_add_tail(&dd->hotplug_list, &ds->hotplug_devices); | 122 | list_add_tail(&dd->hotplug_list, &ds->hotplug_devices); |
123 | spin_unlock(&ds->hp_lock); | 123 | mutex_unlock(&ds->hp_lock); |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /** |
@@ -134,9 +134,9 @@ static void | |||
134 | dock_del_hotplug_device(struct dock_station *ds, | 134 | dock_del_hotplug_device(struct dock_station *ds, |
135 | struct dock_dependent_device *dd) | 135 | struct dock_dependent_device *dd) |
136 | { | 136 | { |
137 | spin_lock(&ds->hp_lock); | 137 | mutex_lock(&ds->hp_lock); |
138 | list_del(&dd->hotplug_list); | 138 | list_del(&dd->hotplug_list); |
139 | spin_unlock(&ds->hp_lock); | 139 | mutex_unlock(&ds->hp_lock); |
140 | } | 140 | } |
141 | 141 | ||
142 | /** | 142 | /** |
@@ -299,7 +299,7 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event) | |||
299 | { | 299 | { |
300 | struct dock_dependent_device *dd; | 300 | struct dock_dependent_device *dd; |
301 | 301 | ||
302 | spin_lock(&ds->hp_lock); | 302 | mutex_lock(&ds->hp_lock); |
303 | 303 | ||
304 | /* | 304 | /* |
305 | * First call driver specific hotplug functions | 305 | * First call driver specific hotplug functions |
@@ -321,7 +321,7 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event) | |||
321 | else | 321 | else |
322 | dock_create_acpi_device(dd->handle); | 322 | dock_create_acpi_device(dd->handle); |
323 | } | 323 | } |
324 | spin_unlock(&ds->hp_lock); | 324 | mutex_unlock(&ds->hp_lock); |
325 | } | 325 | } |
326 | 326 | ||
327 | static void dock_event(struct dock_station *ds, u32 event, int num) | 327 | static void dock_event(struct dock_station *ds, u32 event, int num) |
@@ -681,7 +681,7 @@ static int dock_add(acpi_handle handle) | |||
681 | INIT_LIST_HEAD(&dock_station->dependent_devices); | 681 | INIT_LIST_HEAD(&dock_station->dependent_devices); |
682 | INIT_LIST_HEAD(&dock_station->hotplug_devices); | 682 | INIT_LIST_HEAD(&dock_station->hotplug_devices); |
683 | spin_lock_init(&dock_station->dd_lock); | 683 | spin_lock_init(&dock_station->dd_lock); |
684 | spin_lock_init(&dock_station->hp_lock); | 684 | mutex_init(&dock_station->hp_lock); |
685 | ATOMIC_INIT_NOTIFIER_HEAD(&dock_notifier_list); | 685 | ATOMIC_INIT_NOTIFIER_HEAD(&dock_notifier_list); |
686 | 686 | ||
687 | /* initialize platform device stuff */ | 687 | /* initialize platform device stuff */ |