ALSA: hda: Use dev_to_hdac_dev macro
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Tue, 5 May 2020 03:03:52 +0000 (11:03 +0800)
committerTakashi Iwai <tiwai@suse.de>
Tue, 5 May 2020 06:58:35 +0000 (08:58 +0200)
Use dev_to_hdac_dev() 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-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/ext/hdac_ext_bus.c
sound/hda/hdac_device.c

index 73bfa71845f667a04b81daa40cfff09f46971c98..d0a604c939dfc86407ed2e3dc1131bf07f79f133 100644 (file)
@@ -62,7 +62,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_exit);
 
 static void default_release(struct device *dev)
 {
-       snd_hdac_ext_bus_device_exit(container_of(dev, struct hdac_device, dev));
+       snd_hdac_ext_bus_device_exit(dev_to_hdac_dev(dev));
 }
 
 /**
index e3119f5cb0d511770cfae2c47b0f2a27774f97f0..333220f0f8afc0a8496c932bcba4657ac7922683 100644 (file)
@@ -20,7 +20,7 @@ static int get_codec_vendor_name(struct hdac_device *codec);
 
 static void default_release(struct device *dev)
 {
-       snd_hdac_device_exit(container_of(dev, struct hdac_device, dev));
+       snd_hdac_device_exit(dev_to_hdac_dev(dev));
 }
 
 /**