Messages in this thread | | | Date | Thu, 14 Feb 2013 09:54:08 +1100 | From | Ryan Mallon <> | Subject | Re: [PATCH 4/4] gpiolib: rename local offset variables to "hwgpio" |
| |
On 13/02/13 18:03, Alexandre Courbot wrote: > From: Alexandre Courbot <acourbot@nvidia.com> > > Their value being obtained by gpio_chip_hwgpio(), this better reflects > their use. > > Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> > --- > drivers/gpio/gpiolib.c | 70 +++++++++++++++++++++++++------------------------- > 1 file changed, 35 insertions(+), 35 deletions(-) > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > index d8aa1a0..42838c2 100644 > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -72,7 +72,7 @@ struct gpio_desc { > }; > static struct gpio_desc gpio_desc[ARCH_NR_GPIOS]; > > -#define GPIO_OFFSET_VALID(chip, offset) (offset >= 0 && offset < chip->ngpio) > +#define GPIO_HWNUM_VALID(chip, hwgpio) (hwgpio >= 0 && hwgpio < chip->ngpio)
Nitpicky - Is it accurate to call these hardware numbers? Don't some of the platforms remap the gpio numbers? These numbers may not match against the platform's datasheet for example.
~Ryan
| |