lkml.org 
[lkml]   [2013]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2013-02-14 00:42    [W:0.080 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site