Merge branch 'for-linus' into for-next
[platform/kernel/linux-starfive.git] / sound / pci / hda / patch_hdmi.c
index 93760a3..9b604ec 100644 (file)
@@ -2024,7 +2024,7 @@ static const struct hda_pcm_ops generic_ops = {
 
 static int hdmi_get_spk_alloc(struct hdac_device *hdac, int pcm_idx)
 {
-       struct hda_codec *codec = container_of(hdac, struct hda_codec, core);
+       struct hda_codec *codec = hdac_to_hda_codec(hdac);
        struct hdmi_spec *spec = codec->spec;
        struct hdmi_spec_per_pin *per_pin = pcm_idx_to_pin(spec, pcm_idx);
 
@@ -2037,7 +2037,7 @@ static int hdmi_get_spk_alloc(struct hdac_device *hdac, int pcm_idx)
 static void hdmi_get_chmap(struct hdac_device *hdac, int pcm_idx,
                                        unsigned char *chmap)
 {
-       struct hda_codec *codec = container_of(hdac, struct hda_codec, core);
+       struct hda_codec *codec = hdac_to_hda_codec(hdac);
        struct hdmi_spec *spec = codec->spec;
        struct hdmi_spec_per_pin *per_pin = pcm_idx_to_pin(spec, pcm_idx);
 
@@ -2051,7 +2051,7 @@ static void hdmi_get_chmap(struct hdac_device *hdac, int pcm_idx,
 static void hdmi_set_chmap(struct hdac_device *hdac, int pcm_idx,
                                unsigned char *chmap, int prepared)
 {
-       struct hda_codec *codec = container_of(hdac, struct hda_codec, core);
+       struct hda_codec *codec = hdac_to_hda_codec(hdac);
        struct hdmi_spec *spec = codec->spec;
        struct hdmi_spec_per_pin *per_pin = pcm_idx_to_pin(spec, pcm_idx);
 
@@ -2067,7 +2067,7 @@ static void hdmi_set_chmap(struct hdac_device *hdac, int pcm_idx,
 
 static bool is_hdmi_pcm_attached(struct hdac_device *hdac, int pcm_idx)
 {
-       struct hda_codec *codec = container_of(hdac, struct hda_codec, core);
+       struct hda_codec *codec = hdac_to_hda_codec(hdac);
        struct hdmi_spec *spec = codec->spec;
        struct hdmi_spec_per_pin *per_pin = pcm_idx_to_pin(spec, pcm_idx);
 
@@ -3787,7 +3787,7 @@ static int atihdmi_paired_chmap_validate(struct hdac_chmap *chmap,
 static int atihdmi_pin_set_slot_channel(struct hdac_device *hdac,
                hda_nid_t pin_nid, int hdmi_slot, int stream_channel)
 {
-       struct hda_codec *codec = container_of(hdac, struct hda_codec, core);
+       struct hda_codec *codec = hdac_to_hda_codec(hdac);
        int verb;
        int ati_channel_setup = 0;
 
@@ -3823,7 +3823,7 @@ static int atihdmi_pin_set_slot_channel(struct hdac_device *hdac,
 static int atihdmi_pin_get_slot_channel(struct hdac_device *hdac,
                                hda_nid_t pin_nid, int asp_slot)
 {
-       struct hda_codec *codec = container_of(hdac, struct hda_codec, core);
+       struct hda_codec *codec = hdac_to_hda_codec(hdac);
        bool was_odd = false;
        int ati_asp_slot = asp_slot;
        int verb;