aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/hda_codec.c10
-rw-r--r--sound/pci/hda/hda_local.h1
2 files changed, 2 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index e14faf5d5053..8f34fb447983 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -263,7 +263,7 @@ int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex)
263 unsol->queue[wp] = res; 263 unsol->queue[wp] = res;
264 unsol->queue[wp + 1] = res_ex; 264 unsol->queue[wp + 1] = res_ex;
265 265
266 queue_work(unsol->workq, &unsol->work); 266 schedule_work(&unsol->work);
267 267
268 return 0; 268 return 0;
269} 269}
@@ -310,12 +310,6 @@ static int init_unsol_queue(struct hda_bus *bus)
310 snd_printk(KERN_ERR "hda_codec: can't allocate unsolicited queue\n"); 310 snd_printk(KERN_ERR "hda_codec: can't allocate unsolicited queue\n");
311 return -ENOMEM; 311 return -ENOMEM;
312 } 312 }
313 unsol->workq = create_singlethread_workqueue("hda_codec");
314 if (! unsol->workq) {
315 snd_printk(KERN_ERR "hda_codec: can't create workqueue\n");
316 kfree(unsol);
317 return -ENOMEM;
318 }
319 INIT_WORK(&unsol->work, process_unsol_events); 313 INIT_WORK(&unsol->work, process_unsol_events);
320 unsol->bus = bus; 314 unsol->bus = bus;
321 bus->unsol = unsol; 315 bus->unsol = unsol;
@@ -334,7 +328,7 @@ static int snd_hda_bus_free(struct hda_bus *bus)
334 if (! bus) 328 if (! bus)
335 return 0; 329 return 0;
336 if (bus->unsol) { 330 if (bus->unsol) {
337 destroy_workqueue(bus->unsol->workq); 331 flush_scheduled_work();
338 kfree(bus->unsol); 332 kfree(bus->unsol);
339 } 333 }
340 list_for_each_safe(p, n, &bus->codec_list) { 334 list_for_each_safe(p, n, &bus->codec_list) {
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index b2f56d688852..39718d6cdadd 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -199,7 +199,6 @@ struct hda_bus_unsolicited {
199 unsigned int rp, wp; 199 unsigned int rp, wp;
200 200
201 /* workqueue */ 201 /* workqueue */
202 struct workqueue_struct *workq;
203 struct work_struct work; 202 struct work_struct work;
204 struct hda_bus *bus; 203 struct hda_bus *bus;
205}; 204};