summaryrefslogtreecommitdiff
path: root/sound/pci/vx222/vx222.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-05-12 11:02:08 +0300
committerTakashi Iwai <tiwai@suse.de>2017-05-15 12:21:05 +0300
commit5f976f58917eafbd8f725b9b7c0efcf6937e0e83 (patch)
tree90b92404da674fb2a6365a0a71e34914781f0b25 /sound/pci/vx222/vx222.h
parent6c1df232731f83621fd6d590aa1a2325ceefaed9 (diff)
downloadlinux-5f976f58917eafbd8f725b9b7c0efcf6937e0e83.tar.xz
ALSA: vx222: Use container_of()
The vx222 driver is using the explicit cast from the parent class pointer, but it'll be broken when the structure field randomization is applied. Use container_of() in a modern manner, instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/vx222/vx222.h')
-rw-r--r--sound/pci/vx222/vx222.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/vx222/vx222.h b/sound/pci/vx222/vx222.h
index 2f0d78f609a6..cae355c8ed28 100644
--- a/sound/pci/vx222/vx222.h
+++ b/sound/pci/vx222/vx222.h
@@ -39,6 +39,8 @@ struct snd_vx222 {
int mic_level; /* mic level for vx222 mic */
};
+#define to_vx222(x) container_of(x, struct snd_vx222, core)
+
/* we use a lookup table with 148 values, see vx_mixer.c */
#define VX2_AKM_LEVEL_MAX 0x93