summaryrefslogtreecommitdiffstats
path: root/sound/spi/at73c213.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-12-09 10:49:35 +0100
committerTakashi Iwai <tiwai@suse.de>2019-12-11 07:25:21 +0100
commitce747f864268981e5db12c638265a0ddfd9c7f78 (patch)
tree881d3929f69e871bff6bcb8f60e571c898923602 /sound/spi/at73c213.c
parentALSA: sparc: Use managed buffer allocation (diff)
downloadlinux-ce747f864268981e5db12c638265a0ddfd9c7f78.tar.xz
linux-ce747f864268981e5db12c638265a0ddfd9c7f78.zip
ALSA: spi: Use managed buffer allocation
Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-64-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/spi/at73c213.c')
-rw-r--r--sound/spi/at73c213.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c
index 4de1ba9a418d..8b1b5c86cebf 100644
--- a/sound/spi/at73c213.c
+++ b/sound/spi/at73c213.c
@@ -242,13 +242,7 @@ static int snd_at73c213_pcm_hw_params(struct snd_pcm_substream *substream,
val = SSC_BFINS(TFMR_DATNB, channels - 1, val);
ssc_writel(chip->ssc->regs, TFMR, val);
- return snd_pcm_lib_malloc_pages(substream,
- params_buffer_bytes(hw_params));
-}
-
-static int snd_at73c213_pcm_hw_free(struct snd_pcm_substream *substream)
-{
- return snd_pcm_lib_free_pages(substream);
+ return 0;
}
static int snd_at73c213_pcm_prepare(struct snd_pcm_substream *substream)
@@ -324,7 +318,6 @@ static const struct snd_pcm_ops at73c213_playback_ops = {
.close = snd_at73c213_pcm_close,
.ioctl = snd_pcm_lib_ioctl,
.hw_params = snd_at73c213_pcm_hw_params,
- .hw_free = snd_at73c213_pcm_hw_free,
.prepare = snd_at73c213_pcm_prepare,
.trigger = snd_at73c213_pcm_trigger,
.pointer = snd_at73c213_pcm_pointer,
@@ -347,7 +340,7 @@ static int snd_at73c213_pcm_new(struct snd_at73c213 *chip, int device)
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &at73c213_playback_ops);
- snd_pcm_lib_preallocate_pages_for_all(chip->pcm,
+ snd_pcm_set_managed_buffer_all(chip->pcm,
SNDRV_DMA_TYPE_DEV, &chip->ssc->pdev->dev,
64 * 1024, 64 * 1024);
out: