Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755806AbZA1MGl (ORCPT ); Wed, 28 Jan 2009 07:06:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754514AbZA1MGX (ORCPT ); Wed, 28 Jan 2009 07:06:23 -0500 Received: from cantor2.suse.de ([195.135.220.15]:33194 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753887AbZA1MGW (ORCPT ); Wed, 28 Jan 2009 07:06:22 -0500 Date: Wed, 28 Jan 2009 13:06:20 +0100 Message-ID: From: Takashi Iwai To: Thadeu Lima de Souza Cascardo Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: Don't cold reset AC97 codecs in some ICH chipsets In-Reply-To: <1233136956-16830-1-git-send-email-cascardo@holoscopio.com> References: <1233136956-16830-1-git-send-email-cascardo@holoscopio.com> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.3 (x86_64-suse-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1512 Lines: 52 At Wed, 28 Jan 2009 08:02:36 -0200, Thadeu Lima de Souza Cascardo wrote: > > Check in a quirk list if it should do cold reset when AC97 power saving > is enabled. Some devices do not resume properly when cold reset, > although power saving works OK. > > Signed-off-by: Thadeu Lima de Souza Cascardo Thanks for the patch. We can go better further with this patch now :) The logic is basically fine, but just a few comments... > diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c > index 19d3391..69b3ed8 100644 > --- a/sound/pci/intel8x0.c > +++ b/sound/pci/intel8x0.c ... > +static int snd_intel8x0_ich_chip_cold_reset(struct intel8x0 *chip) > +{ > + unsigned int cnt; > /* ACLink on, 2 channels */ > + > + if (snd_pci_quirk_lookup(chip->pci, ich_chip_reset_mode)) > + return -EIO; I feel it isn't intuitive to return -EIO here. It'd be more straightforward to call snd_intel8x0_ich_chip_reset() from here? if (snd_pci_quirk_lookup(chip->pci, ich_chip_reset_mode)) return snd_intl8x0_ich_chip_reset(chip); > + if (snd_intel8x0_ich_chip_cold_reset(chip) < 0) > + if ((err = snd_intel8x0_ich_chip_reset(chip)) < 0) > + return err; Please make the change checkpatch-clean. Could you fix and repost? thanks, Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/