From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755385Ab1INJGl (ORCPT ); Wed, 14 Sep 2011 05:06:41 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38797 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754911Ab1INJGk (ORCPT ); Wed, 14 Sep 2011 05:06:40 -0400 Date: Wed, 14 Sep 2011 11:06:39 +0200 Message-ID: From: Takashi Iwai To: Yong Zhang Cc: Clemens Ladisch , 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: <20110914084957.GB23710@zhy> References: <20110908144519.GB3069@zhy> <4E69253F.3090705@ladisch.de> <20110909013143.GB18249@zhy> <4E6CCF6C.2020301@ladisch.de> <4E6E061E.2010000@ladisch.de> <4E6E6A34.8060104@ladisch.de> <4E6F1194.80106@ladisch.de> <4E6F2159.6060606@ladisch.de> <20110914084957.GB23710@zhy> 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 Wed, 14 Sep 2011 16:49:57 +0800, Yong Zhang wrote: > > On Tue, Sep 13, 2011 at 11:24:41AM +0200, Clemens Ladisch wrote: > [snip] > > > > completely untested: > > > > --8<---------------------------------------------------------------->8-- > > ALSA: mpu401: clean up interrupt specification > > > > The semantics of snd_mpu401_uart_new()'s interrupt parameters are > > somewhat counterintuitive: To prevent the function from allocating its > > own interrupt, either the irq number must be invalid, or the irq_flags > > parameter must be zero. At the same time, the irq parameter being > > invalid specifies that the mpu401 code has to work without an interrupt > > allocated by the caller. This implies that, if there is an interrupt > > and it is allocated by the caller, the irq parameter must be set to > > a valid-looking number which then isn't actually used. > > > > With the removal of IRQF_DISABLED, zero becomes a valid irq_flags value, > > which forces us to handle the parameters differently. > > > > This patch introduces a new flag MPU401_INFO_IRQ_HOOK for when the > > device interrupt is handled by the caller, and makes the allocation of > > the interrupt to depend only on the irq parameter. As suggested by > > Takashi, the irq_flags parameter was dropped because, when used, it had > > the constant value IRQF_DISABLED. > > Thanks Clemens. Your patch will eventually save much lines from mine , > actually I only need to touch request_irq() in snd_mpu401_uart_new(). > > But do you have any idea by which tree this patch will go to mainline? > Thus I could make a new patch based on it :) I applied Clemens' patch now to sound git tree. The temporary location is: git://github.com/tiwai/sound.git In general, such cross-tree patches should be based on linux-next, which should contain the latest subsystem tree. But as kernel.org is down now, you can check each subsystem tree. thanks, Takashi