Re: [PATCH 11/15] drivers/mfd: Enable Device Tree for ab8500-core driver

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

 



On Wednesday 09 May 2012, Linus Walleij wrote:
> > +       else if (np)
> > +               ret = of_property_read_u32(np, "stericsson,irq-base", &ab8500->irq_base);
> > +
> > +       if (ab8500->irq_base == 0) {
> 
> Shouldn't this be (av8500->irq_base == NO_IRQ) now that we're tranisitioning to
> use 0 as NO_IRQ?

Since we're into bike-shedding already, why not make it :? :-)

	if (!ab8500->irq_base)

I usually prefer this syntax for testing if something has been assigned,
while I use a comparison with 0 only when it is a meant as a numeric value
rather than meant as validity test.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux