From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753977Ab0GZIf0 (ORCPT ); Mon, 26 Jul 2010 04:35:26 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35646 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121Ab0GZIfZ (ORCPT ); Mon, 26 Jul 2010 04:35:25 -0400 Date: Mon, 26 Jul 2010 10:35:20 +0200 Message-ID: From: Takashi Iwai To: Kulikov Vasiliy Cc: kernel-janitors@vger.kernel.org, Jaroslav Kysela , Ralf Baechle , Manuel Lauss , Arnd Bergmann , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH] oss: au1550_ac97: simplify au1550_delay() In-Reply-To: <1280132913-8306-1-git-send-email-segooon@gmail.com> References: <1280132913-8306-1-git-send-email-segooon@gmail.com> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) 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 At Mon, 26 Jul 2010 12:28:32 +0400, Kulikov Vasiliy wrote: > > au1550_delay() uses loop with schedule_timeout() to unconditionally wait > for msec. Use schedule_timeout_uninteruptible() instead. > > Signed-off-by: Kulikov Vasiliy Thanks, applied both patches. Takashi > --- > sound/oss/au1550_ac97.c | 11 +---------- > 1 files changed, 1 insertions(+), 10 deletions(-) > > diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c > index 0fd256c..c4a4cdc 100644 > --- a/sound/oss/au1550_ac97.c > +++ b/sound/oss/au1550_ac97.c > @@ -163,19 +163,10 @@ ld2(unsigned int x) > static void > au1550_delay(int msec) > { > - unsigned long tmo; > - signed long tmo2; > - > if (in_interrupt()) > return; > > - tmo = jiffies + (msec * HZ) / 1000; > - for (;;) { > - tmo2 = tmo - jiffies; > - if (tmo2 <= 0) > - break; > - schedule_timeout(tmo2); > - } > + schedule_timeout_uninterruptible(msecs_to_jiffies(msec)); > } > > static u16 > -- > 1.7.0.4 >