diff options
author | Kai-Heng Feng <kai.heng.feng@canonical.com> | 2020-05-05 05:03:53 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-05-05 08:59:02 +0200 |
commit | 8c11827bba724046fec50a1f16a205bbea3eeb08 (patch) | |
tree | f31740c6fd7c80f88d58d1467f50e0b30db5fd25 /include/sound/hda_codec.h | |
parent | ALSA: hda: Use dev_to_hdac_dev macro (diff) | |
download | linux-8c11827bba724046fec50a1f16a205bbea3eeb08.tar.xz linux-8c11827bba724046fec50a1f16a205bbea3eeb08.zip |
ALSA: hda: Use hdac_to_hda_codec macro
Use hdac_to_hda_codec() instead of container_of().
No functional change intended.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200505030357.28004-2-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/hda_codec.h')
-rw-r--r-- | include/sound/hda_codec.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h index 225154a4f2ed..8a32060e3d8d 100644 --- a/include/sound/hda_codec.h +++ b/include/sound/hda_codec.h @@ -288,6 +288,10 @@ struct hda_codec { #define dev_to_hda_codec(_dev) container_of(_dev, struct hda_codec, core.dev) #define hda_codec_dev(_dev) (&(_dev)->core.dev) +#define hdac_to_hda_priv(_hdac) \ + container_of(_hdac, struct hdac_hda_priv, codec.core) +#define hdac_to_hda_codec(_hdac) container_of(_hdac, struct hda_codec, core) + #define list_for_each_codec(c, bus) \ list_for_each_entry(c, &(bus)->core.codec_list, core.list) #define list_for_each_codec_safe(c, n, bus) \ |