From: Takashi Iwai Subject: Re: [PATCH] azt3328.c: add suspend/resume support Date: Tue, 18 Apr 2006 15:25:56 +0200 Message-ID: References: <20060411082956.GA20725@rhlx01.fht-esslingen.de> <20060416212614.GA16301@rhlx01.fht-esslingen.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20060416212614.GA16301@rhlx01.fht-esslingen.de> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: andi@lisas.de Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Sun, 16 Apr 2006 23:26:14 +0200, Andreas Mohr wrote: > > Hi, > > On Tue, Apr 11, 2006 at 11:46:37AM +0200, Takashi Iwai wrote: > > At Tue, 11 Apr 2006 10:29:56 +0200, > > Andreas Mohr wrote: > > > + for (reg = 0; reg < AZF_IO_SIZE_MIXER_PM; reg += 2) > > > + *(u16 *)&chip->saved_regs_mixer[reg] = inw(chip->mixer_port + reg); > > > > That's a bad style. Rather define > > > > u16 saved_regs_mixer[AZF_IO_SIZE_CODEC_PM / 2]; > > > > and > > for (reg = 0; reg < AZF_IO_SIZE_MIXER_PM / 2; reg++) > > chip->saved_regs_mixer[reg] = inw(chip->mixer_port + reg * 2); > > > > than type-punning. Or, you can use ARRAY_SIZE() in the loop, too. > > Indeed. That better? Thanks, better now. Could you split to individual patches for each, PM-support, 3D mixer switch and correction of mixer strings? Also, the cases in switch block aren't indented in linux kernel coding style. I'll merge this likely after ALSA 1.0.11-final, which is planned to be released soon. Takashi ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642