From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753483Ab1ILKrc (ORCPT ); Mon, 12 Sep 2011 06:47:32 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41969 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750835Ab1ILKrb (ORCPT ); Mon, 12 Sep 2011 06:47:31 -0400 Date: Mon, 12 Sep 2011 12:47:29 +0200 Message-ID: From: Takashi Iwai To: Clemens Ladisch Cc: Yong Zhang , linux-kernel@vger.kernel.org, Jaroslav Kysela , alsa-devel@alsa-project.org Subject: Re: [RFC] [PATCH 02/62] mpu401:snd_mpu401_uart_new(): split semantic of irq_flags In-Reply-To: <4E6CCF6C.2020301@ladisch.de> References: <1315383059-3673-1-git-send-email-yong.zhang0@gmail.com> <1315383059-3673-3-git-send-email-yong.zhang0@gmail.com> <4E689E9A.8000407@ladisch.de> <20110908133700.GB2310@zhy> <4E68CA15.8000504@ladisch.de> <20110908144519.GB3069@zhy> <4E69253F.3090705@ladisch.de> <20110909013143.GB18249@zhy> <4E6CCF6C.2020301@ladisch.de> 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.3 (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 Sun, 11 Sep 2011 17:10:36 +0200, Clemens Ladisch wrote: > > diff --git a/sound/isa/als100.c b/sound/isa/als100.c > index 20becc8..3355609 100644 > --- a/sound/isa/als100.c > +++ b/sound/isa/als100.c > @@ -245,18 +245,22 @@ static int __devinit snd_card_als100_probe(int dev, > > if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) { > int mpu_type = MPU401_HW_ALS100; > + int mpu_flags = 0; > > - if (mpu_irq[dev] == SNDRV_AUTO_IRQ) > + if (mpu_irq[dev] == SNDRV_AUTO_IRQ) { > mpu_irq[dev] = -1; > + mpu_flags = MPU401_INFO_RX_POLL; > + } When mpu_irq[dev] is set to -1, it won't work. Instead of setting mpu_flag in this if block, you'd need another check of mpu_irq[], i.e. if (mpu_irq[dev] == SNDRV_AUTO_IRQ) mpu_irq[dev] = -1; if (mpu_irq[dev] < 0) mpu_flags = MPU401_INFO_RX_POLL; The similar problems are found in other places, too. thanks, Takashi From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [RFC] [PATCH 02/62] mpu401:snd_mpu401_uart_new(): split semantic of irq_flags Date: Mon, 12 Sep 2011 12:47:29 +0200 Message-ID: References: <1315383059-3673-1-git-send-email-yong.zhang0@gmail.com> <1315383059-3673-3-git-send-email-yong.zhang0@gmail.com> <4E689E9A.8000407@ladisch.de> <20110908133700.GB2310@zhy> <4E68CA15.8000504@ladisch.de> <20110908144519.GB3069@zhy> <4E69253F.3090705@ladisch.de> <20110909013143.GB18249@zhy> <4E6CCF6C.2020301@ladisch.de> 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 alsa0.perex.cz (Postfix) with ESMTP id 9A6501038DF for ; Mon, 12 Sep 2011 12:47:30 +0200 (CEST) In-Reply-To: <4E6CCF6C.2020301@ladisch.de> 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: Clemens Ladisch Cc: Yong Zhang , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org At Sun, 11 Sep 2011 17:10:36 +0200, Clemens Ladisch wrote: > > diff --git a/sound/isa/als100.c b/sound/isa/als100.c > index 20becc8..3355609 100644 > --- a/sound/isa/als100.c > +++ b/sound/isa/als100.c > @@ -245,18 +245,22 @@ static int __devinit snd_card_als100_probe(int dev, > > if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) { > int mpu_type = MPU401_HW_ALS100; > + int mpu_flags = 0; > > - if (mpu_irq[dev] == SNDRV_AUTO_IRQ) > + if (mpu_irq[dev] == SNDRV_AUTO_IRQ) { > mpu_irq[dev] = -1; > + mpu_flags = MPU401_INFO_RX_POLL; > + } When mpu_irq[dev] is set to -1, it won't work. Instead of setting mpu_flag in this if block, you'd need another check of mpu_irq[], i.e. if (mpu_irq[dev] == SNDRV_AUTO_IRQ) mpu_irq[dev] = -1; if (mpu_irq[dev] < 0) mpu_flags = MPU401_INFO_RX_POLL; The similar problems are found in other places, too. thanks, Takashi