From 2e0de6ea956ff429cf11bd1a92d7444bc6000698 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 12 May 2017 10:03:35 +0200 Subject: 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 --- sound/pcmcia/vx/vxpocket.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/pcmcia/vx/vxpocket.h') 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); -- cgit