Re: [PATCH 1/2] gpio: rdc321x: Fix off-by-one for ngpio setting

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

 



2014-04-23 14:53 GMT-07:00 Linus Walleij <linus.walleij@xxxxxxxxxx>:
> On Wed, Apr 23, 2014 at 4:00 PM, Axel Lin <axel.lin@xxxxxxxxxx> wrote:
>> 2014-04-23 21:25 GMT+08:00 Linus Walleij <linus.walleij@xxxxxxxxxx>:
>
>>> -#define RDC321X_MAX_GPIO    58
>>> +#define RDC321X_MAX_GPIO    59
>> Hi Linus,
>>
>> I'm wondering if it is better to define RDC321X_NUM_GPIO  (59) rather
>> than RDC321X_MAX_GPIO.
>> How do you think?
>
> I think yes. It's not a maximum really is it? It's the number available,
> they just mean the max enumerator you can use :-P

Yes, NUM_GPIO is probably a better name for this, and it turns out to
also be the maximum for that particular GPIO chip, then it's all good.
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux