From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [RFC 4/8] snd-aoa: add i2sbus Date: Wed, 07 Jun 2006 14:41:19 +0200 Message-ID: References: <20060601115844.343214000@sipsolutions.net> <20060601115847.420788000@sipsolutions.net> <1149592647.5928.49.camel@johannes.berg> <1149680421.3999.4.camel@johannes> 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 mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id F0BF2165 for ; Wed, 7 Jun 2006 14:41:31 +0200 (MEST) In-Reply-To: <1149680421.3999.4.camel@johannes> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Johannes Berg Cc: linuxppc-dev@ozlabs.org, alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 07 Jun 2006 13:40:21 +0200, Johannes Berg wrote: > > On Tue, 2006-06-06 at 16:00 +0200, Takashi Iwai wrote: > > > > Yeah, I guess, never really thought about that, just wrote it down the > > > way I thought to do it :) That said, I think it's more readable if > > > written that way, do you want me to change it regardless? > > > > I found a single if is more readable (and good for compiler). > > Heh ok, I'll change it, it isn't really hard to read either way. > > > > No, the only requirement is that you have to call snd_pcm_lib_malloc() > > with proper type and assigned device pointer if you use > > snd_pcm_lib_malloc() function. (If not called, you've got an error > > when compiled with debug option.) > > Ok, but how do I set the device pointer? Your code already does it. The macro pci_to_dev() retrieves struct device pointer (it's just for compatibility with older kernels). Takashi