aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dock.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r--drivers/acpi/dock.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 578b99b71d9c..c7df2a1ea9d7 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -44,7 +44,7 @@ struct dock_station {
44 unsigned long last_dock_time; 44 unsigned long last_dock_time;
45 u32 flags; 45 u32 flags;
46 spinlock_t dd_lock; 46 spinlock_t dd_lock;
47 spinlock_t hp_lock; 47 struct mutex hp_lock;
48 struct list_head dependent_devices; 48 struct list_head dependent_devices;
49 struct list_head hotplug_devices; 49 struct list_head hotplug_devices;
50}; 50};
@@ -114,9 +114,9 @@ static void
114dock_add_hotplug_device(struct dock_station *ds, 114dock_add_hotplug_device(struct dock_station *ds,
115 struct dock_dependent_device *dd) 115 struct dock_dependent_device *dd)
116{ 116{
117 spin_lock(&ds->hp_lock); 117 mutex_lock(&ds->hp_lock);
118 list_add_tail(&dd->hotplug_list, &ds->hotplug_devices); 118 list_add_tail(&dd->hotplug_list, &ds->hotplug_devices);
119 spin_unlock(&ds->hp_lock); 119 mutex_unlock(&ds->hp_lock);
120} 120}
121 121
122/** 122/**
@@ -130,9 +130,9 @@ static void
130dock_del_hotplug_device(struct dock_station *ds, 130dock_del_hotplug_device(struct dock_station *ds,
131 struct dock_dependent_device *dd) 131 struct dock_dependent_device *dd)
132{ 132{
133 spin_lock(&ds->hp_lock); 133 mutex_lock(&ds->hp_lock);
134 list_del(&dd->hotplug_list); 134 list_del(&dd->hotplug_list);
135 spin_unlock(&ds->hp_lock); 135 mutex_unlock(&ds->hp_lock);
136} 136}
137 137
138/** 138/**
@@ -295,7 +295,7 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event)
295{ 295{
296 struct dock_dependent_device *dd; 296 struct dock_dependent_device *dd;
297 297
298 spin_lock(&ds->hp_lock); 298 mutex_lock(&ds->hp_lock);
299 299
300 /* 300 /*
301 * First call driver specific hotplug functions 301 * First call driver specific hotplug functions
@@ -317,7 +317,7 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event)
317 else 317 else
318 dock_create_acpi_device(dd->handle); 318 dock_create_acpi_device(dd->handle);
319 } 319 }
320 spin_unlock(&ds->hp_lock); 320 mutex_unlock(&ds->hp_lock);
321} 321}
322 322
323static void dock_event(struct dock_station *ds, u32 event, int num) 323static void dock_event(struct dock_station *ds, u32 event, int num)
@@ -625,7 +625,7 @@ static int dock_add(acpi_handle handle)
625 INIT_LIST_HEAD(&dock_station->dependent_devices); 625 INIT_LIST_HEAD(&dock_station->dependent_devices);
626 INIT_LIST_HEAD(&dock_station->hotplug_devices); 626 INIT_LIST_HEAD(&dock_station->hotplug_devices);
627 spin_lock_init(&dock_station->dd_lock); 627 spin_lock_init(&dock_station->dd_lock);
628 spin_lock_init(&dock_station->hp_lock); 628 mutex_init(&dock_station->hp_lock);
629 ATOMIC_INIT_NOTIFIER_HEAD(&dock_notifier_list); 629 ATOMIC_INIT_NOTIFIER_HEAD(&dock_notifier_list);
630 630
631 /* Find dependent devices */ 631 /* Find dependent devices */