summaryrefslogtreecommitdiff
path: root/sound/pcmcia/vx/vxpocket.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-05-12 10:03:35 +0200
committerTakashi Iwai <tiwai@suse.de>2017-05-17 07:12:57 +0200
commit2e0de6ea956ff429cf11bd1a92d7444bc6000698 (patch)
tree7cd743dd2f71643a3d09ca565912d11f684246e9 /sound/pcmcia/vx/vxpocket.h
parent5f976f58917eafbd8f725b9b7c0efcf6937e0e83 (diff)
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 'sound/pcmcia/vx/vxpocket.h')
-rw-r--r--sound/pcmcia/vx/vxpocket.h2
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);