summaryrefslogtreecommitdiff
path: root/include/sound/hdaudio.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-04-10 16:00:54 +0200
committerTakashi Iwai <tiwai@suse.de>2019-04-13 10:10:26 +0200
commite61ab9f017493ef42f0374a578b2758c30f41f74 (patch)
tree4f1ae58995d9ef64c8dd2091485f206abeacc2df /include/sound/hdaudio.h
parent99fff44fe339b21c6a4ddd6c1239e587dd439cd3 (diff)
downloadlwn-e61ab9f017493ef42f0374a578b2758c30f41f74.tar.gz
lwn-e61ab9f017493ef42f0374a578b2758c30f41f74.zip
ALSA: hda: Initialize ext-bus-specific fields in snd_hdac_bus_init(), too
Some fields in snd_hdac_bus are ext-bus specific, but they still should be initialized in snd_hdac_bus_init() for consistency, at least, for the ones that do need the explicit initialization like the list head. Also move the lock field to the more appropriate place and correct the comment to reflect the recent change where it serves for both the display power and the link management. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/hdaudio.h')
-rw-r--r--include/sound/hdaudio.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index 45f944d57982..ca1d9a70d026 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -297,7 +297,7 @@ struct hdac_rb {
* @num_streams: streams supported
* @idx: HDA link index
* @hlink_list: link list of HDA links
- * @lock: lock for link mgmt
+ * @lock: lock for link and display power mgmt
* @cmd_dma_state: state of cmd DMAs: CORB and RIRB
*/
struct hdac_bus {
@@ -363,6 +363,7 @@ struct hdac_bus {
/* locks */
spinlock_t reg_lock;
struct mutex cmd_mutex;
+ struct mutex lock;
/* DRM component interface */
struct drm_audio_component *audio_component;
@@ -373,11 +374,9 @@ struct hdac_bus {
int num_streams;
int idx;
+ /* link management */
struct list_head hlink_list;
-
- struct mutex lock;
bool cmd_dma_state;
-
};
int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev,