On Wed, 2009-10-28 at 21:53 +0200, Andrew Victor wrote: > hi, > > > Then I think it would be best to use GPIO_PIN_NONE. Makes it clear > > what is expected and avoids confusion on what should be the proper > > value. > > I hope I'm not saying non-sense, but even if I am, I guess you can see > > that I'm advocating against the magic numbers :) > > What magic numbers ? I think Thiago was referring to the "-1" in the original patch as the magic number. Leaving the field blank to be initialised to 0 is certainly the cleanest, I agree, but it doesn't actually /work/. On many archs 0 is a valid gpio number; the gpio_is_valid check used throughout the kernel (including atmel-mci.c) looks like static inline int gpio_is_valid(int number) { /* only some non-negative numbers are valid */ return ((unsigned)number) < ARCH_NR_GPIOS; } --Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html