diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-05-12 10:02:08 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-05-15 11:21:05 +0200 |
commit | 5f976f58917eafbd8f725b9b7c0efcf6937e0e83 (patch) | |
tree | 90b92404da674fb2a6365a0a71e34914781f0b25 /sound/pci/vx222/vx222.h | |
parent | 6c1df232731f83621fd6d590aa1a2325ceefaed9 (diff) | |
download | op-kernel-dev-5f976f58917eafbd8f725b9b7c0efcf6937e0e83.zip op-kernel-dev-5f976f58917eafbd8f725b9b7c0efcf6937e0e83.tar.gz |
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/vx222/vx222.h b/sound/pci/vx222/vx222.h index 2f0d78f..cae355c 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 |