diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-05-12 10:03:35 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-05-17 07:12:57 +0200 |
commit | 2e0de6ea956ff429cf11bd1a92d7444bc6000698 (patch) | |
tree | 7cd743dd2f71643a3d09ca565912d11f684246e9 /sound/pcmcia/vx/vxpocket.h | |
parent | ALSA: vx222: Use container_of() (diff) | |
download | linux-2e0de6ea956ff429cf11bd1a92d7444bc6000698.tar.xz linux-2e0de6ea956ff429cf11bd1a92d7444bc6000698.zip |
ALSA: vxpocket: Use container_of()
The vxpocket 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 '')
-rw-r--r-- | sound/pcmcia/vx/vxpocket.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pcmcia/vx/vxpocket.h b/sound/pcmcia/vx/vxpocket.h index 13d658c1a216..26f4255e132e 100644 --- a/sound/pcmcia/vx/vxpocket.h +++ b/sound/pcmcia/vx/vxpocket.h @@ -43,6 +43,8 @@ struct snd_vxpocket { struct pcmcia_device *p_dev; }; +#define to_vxpocket(x) container_of(x, struct snd_vxpocket, core) + extern struct snd_vx_ops snd_vxpocket_ops; void vx_set_mic_boost(struct vx_core *chip, int boost); |