[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110908144519.GB3069@zhy>
Date: Thu, 8 Sep 2011 22:45:20 +0800
From: Yong Zhang <yong.zhang0@...il.com>
To: Clemens Ladisch <clemens@...isch.de>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...e.hu,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, Jiri Kosina <jkosina@...e.cz>,
Andreas Mohr <andi@...as.de>,
Lucas De Marchi <lucas.demarchi@...fusion.mobi>,
Julia Lawall <julia@...u.dk>,
Ondrej Zary <linux@...nbow-software.org>,
Dan Carpenter <error27@...il.com>,
Joe Perches <joe@...ches.com>, alsa-devel@...a-project.org
Subject: Re: [RFC] [PATCH 02/62] mpu401:snd_mpu401_uart_new(): split
semantic of irq_flags
On Thu, Sep 08, 2011 at 03:58:45PM +0200, Clemens Ladisch wrote:
>
> The MPU-401 in UART mode is a very simple and stupid MIDI interface,
> which is used on very many sound cards. Depending on the actual
> hardware implementation, it gets its own interrupt which may be
> exclusive or sharable, or it is integrated into the interrupt handling
> of the main sound card which means that the sound driver has to call the
> mpu401 interrupt handler explicitly.
>
> Here, "no interrupt" and "already reserved" actually mean the same thing,
> i.e., that the interrupt handling is the responsibility of some other
> driver.
Thanks. If my understanding is correct, in below combination:
irq irq_flags
1) >=0 >0 /* valid */
2) >=0 =0 /* invalid, irq should be '-1' */
3) -1 >0 /* valid, irq_flags just mean real irq_falgs,
but actually there is no irq */
4) -1 =0 /* valid */
my comment will be true, and we could simplify snd_mpu401_uart_new()
like below:
- if (irq >= 0 && irq_flags) {
+ if (irq >= 0) {
right?
And then we should audit all the callers of snd_mpu401_uart_new()
to check if they provide the cerrect irq number, but IMOH, that
would more difficult than keeping 'want_irq/irq_reserved'.
Thanks,
Yong
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists