ASoC/mpc5200: add to_psc_dma_stream() helper

Move the resolving of the psc_dma_stream pointer to a helper function
to reduce duplicate code

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tento commit je obsažen v:
Grant Likely
2009-11-07 01:34:31 -07:00
odevzdal Mark Brown
rodič c487827475
revize 1d8222e8df
2 změnil soubory, kde provedl 10 přidání a 6 odebrání

Zobrazit soubor

@@ -68,6 +68,15 @@ struct psc_dma {
} stats;
};
/* Utility for retrieving psc_dma_stream structure from a substream */
inline struct psc_dma_stream *
to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma)
{
if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)
return &psc_dma->capture;
return &psc_dma->playback;
}
int mpc5200_audio_dma_create(struct of_device *op);
int mpc5200_audio_dma_destroy(struct of_device *op);