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:
@@ -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);
|
||||
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele