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.c | |
parent | 5f976f58917eafbd8f725b9b7c0efcf6937e0e83 (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.c')
-rw-r--r-- | sound/pcmcia/vx/vxpocket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index b16f42deed67..ca0d19e723fd 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c @@ -155,7 +155,7 @@ static int snd_vxpocket_new(struct snd_card *card, int ibl, } chip->ibl.size = ibl; - vxp = (struct snd_vxpocket *)chip; + vxp = to_vxpocket(chip); vxp->p_dev = link; link->priv = chip; @@ -187,7 +187,7 @@ static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq { int err; struct snd_card *card = chip->card; - struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; + struct snd_vxpocket *vxp = to_vxpocket(chip); snd_printdd(KERN_DEBUG "vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq); vxp->port = port; |