[alsa-devel] [PATCH] ASoC drivers for the Freescale MPC8610 SoC

Takashi Iwai tiwai at suse.de
Fri Dec 21 00:54:16 EST 2007


At Thu, 20 Dec 2007 08:24:35 -0600,
Timur Tabi wrote:
> 
> >> +static int fsl_dma_new(struct snd_card *card, struct snd_soc_codec_dai *dai,
> >> +	struct snd_pcm *pcm)
> >> +{
> >> +	static u64 fsl_dma_dmamask = 0xffffffff;
> >> +	int ret;
> >> +
> >> +	if (!card->dev->dma_mask)
> >> +		card->dev->dma_mask = &fsl_dma_dmamask;
> > 
> > I haven't read how your channel allocation works, but providing a
> > pointer to a local static variable is a bit fishy no matter what.
> 
> I just copied this code from another module.  All the ALSA drivers do this, 

All?  No, only a few...
For PCI, usually pci_set_dma_mask() and pci_set_consistent_dma_mask()
are used, of course.


Takashi



More information about the Linuxppc-dev mailing list