]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: hdac_hdmi: use dev_to_hdac_dev and to_ehdac_device
authorGeliang Tang <geliangtang@163.com>
Mon, 28 Dec 2015 14:47:13 +0000 (22:47 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 4 Jan 2016 11:21:47 +0000 (11:21 +0000)
Use dev_to_hdac_dev() and to_ehdac_device() instead of open-coding.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/hdac_hdmi.c

index 1a2f33b4abfc5e60c76e9d94cf96c04695382d96..b999fb2a463bc9de696604f22f7185127690279a 100644 (file)
@@ -67,9 +67,9 @@ struct hdac_hdmi_priv {
 
 static inline struct hdac_ext_device *to_hda_ext_device(struct device *dev)
 {
-       struct hdac_device *hdac = container_of(dev, struct hdac_device, dev);
+       struct hdac_device *hdac = dev_to_hdac_dev(dev);
 
-       return container_of(hdac, struct hdac_ext_device, hdac);
+       return to_ehdac_device(hdac);
 }
 
 static int hdac_hdmi_setup_stream(struct hdac_ext_device *hdac,