Przeglądaj źródła

[ALSA] fix private data pointer calculation in CS4270 driver

Fix the calculation of the private_data pointer in the CS4270 driver.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Timur Tabi 17 lat temu
rodzic
commit
4df20535ec
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      sound/soc/codecs/cs4270.c

+ 2 - 1
sound/soc/codecs/cs4270.c

@@ -725,7 +725,8 @@ static int cs4270_probe(struct platform_device *pdev)
 	codec->owner = THIS_MODULE;
 	codec->dai = &cs4270_dai;
 	codec->num_dai = 1;
-	codec->private_data = codec + ALIGN(sizeof(struct snd_soc_codec), 4);
+	codec->private_data = (void *) codec +
+		ALIGN(sizeof(struct snd_soc_codec), 4);
 
 	socdev->codec = codec;