Re: [PATCH] libata-sff: Don't call bmdma_stop on non DMA capable controllers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux