[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1170025451.26655.104.camel@localhost.localdomain>
Date: Mon, 29 Jan 2007 10:04:10 +1100
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: David Woodhouse <dwmw2@...radead.org>,
Alan <alan@...rguk.ukuu.org.uk>, Jeff Garzik <jgarzik@...ox.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] libata-sff: Don't call bmdma_stop on non DMA capable
controllers
> We could have done it for interrupts too. A "struct irqnum" that has a bit
> that specifies "valid". That would work. But it tends to be painful, so it
> really has to give you something more than "zero is disabled".
>
> It's just not worth it.
>
> And it's why I decreed, that the ONLY SANE THING is to just let people do
> the obvious thing:
>
> if (!dev->irq)
> return -ENODEV;
>
> you don't have to know ANYTHING, and that code just works, and just looks
> obvious. And you know what? If it causes a bit of pain for some platform
> maintainer, I don't care one whit. Because it's obviously much better than
> the alternatives.
I'd rather have dev->irq be a struct interrupt * :-) The NULL check
would then make more sense and we completely remove "numbers" from
drivers, they have to obtain their struct interrupt via some interrupt
mapping code....
Ben.
-
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