From: Takashi Iwai Subject: Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC Date: Thu, 20 Dec 2007 14:54:16 +0100 Message-ID: References: <11981089894052-git-send-email-timur@freescale.com> <20071220040633.GA6732@lixom.net> <476A7B23.2040905@freescale.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 1D0C2247DC for ; Thu, 20 Dec 2007 16:52:17 +0100 (CET) In-Reply-To: <476A7B23.2040905@freescale.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Timur Tabi Cc: Olof Johansson , linuxppc-dev@ozlabs.org, alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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