ALSA: hda - Embed struct hda_bus_unsolicited into struct hda_bus
There is no big merit to handle hda_bus_unsolicited object individually, as it's tightly coupled with the hda_bus object itself. Embedding it makes the code simpler in the end. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -66,7 +66,6 @@ struct hda_beep;
|
||||
struct hda_codec;
|
||||
struct hda_pcm;
|
||||
struct hda_pcm_stream;
|
||||
struct hda_bus_unsolicited;
|
||||
|
||||
/* NID type */
|
||||
typedef u16 hda_nid_t;
|
||||
@@ -101,6 +100,16 @@ struct hda_bus_ops {
|
||||
#endif
|
||||
};
|
||||
|
||||
/* unsolicited event handler */
|
||||
#define HDA_UNSOL_QUEUE_SIZE 64
|
||||
struct hda_bus_unsolicited {
|
||||
/* ring buffer */
|
||||
u32 queue[HDA_UNSOL_QUEUE_SIZE * 2];
|
||||
unsigned int rp, wp;
|
||||
/* workqueue */
|
||||
struct work_struct work;
|
||||
};
|
||||
|
||||
/*
|
||||
* codec bus
|
||||
*
|
||||
@@ -126,7 +135,7 @@ struct hda_bus {
|
||||
struct mutex prepare_mutex;
|
||||
|
||||
/* unsolicited event queue */
|
||||
struct hda_bus_unsolicited *unsol;
|
||||
struct hda_bus_unsolicited unsol;
|
||||
char workq_name[16];
|
||||
struct workqueue_struct *workq; /* common workqueue for codecs */
|
||||
|
||||
|
Reference in New Issue
Block a user