Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: stm32: dfsdm: add stm32_adfsdm_dummy_cb() callback

Adapt STM32 DFSDM driver to a change in iio_channel_get_all_cb() API.
The callback pointer becomes a requested parameter of this API,
so add a dummy callback to be given as parameter of this function.
However, the stm32_dfsdm_get_buff_cb() API is still used instead,
to optimize DMA transfers.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20201121161457.957-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Olivier Moysan and committed by
Jonathan Cameron
9afaf9a5 29e96f5a

+11 -1
+11 -1
sound/soc/stm/stm32_adfsdm.c
··· 293 293 return 0; 294 294 } 295 295 296 + static int stm32_adfsdm_dummy_cb(const void *data, void *private) 297 + { 298 + /* 299 + * This dummmy callback is requested by iio_channel_get_all_cb() API, 300 + * but the stm32_dfsdm_get_buff_cb() API is used instead, to optimize 301 + * DMA transfers. 302 + */ 303 + return 0; 304 + } 305 + 296 306 static struct snd_soc_component_driver stm32_adfsdm_soc_platform = { 297 307 .open = stm32_adfsdm_pcm_open, 298 308 .close = stm32_adfsdm_pcm_close, ··· 345 335 if (IS_ERR(priv->iio_ch)) 346 336 return PTR_ERR(priv->iio_ch); 347 337 348 - priv->iio_cb = iio_channel_get_all_cb(&pdev->dev, NULL, NULL); 338 + priv->iio_cb = iio_channel_get_all_cb(&pdev->dev, &stm32_adfsdm_dummy_cb, NULL); 349 339 if (IS_ERR(priv->iio_cb)) 350 340 return PTR_ERR(priv->iio_cb); 351 341