[PATCH 5/5] arm: mach-mx3: use IMX_GPIO_NR instead of hard-coded values
Lothar Waßmann
LW at KARO-electronics.de
Tue Feb 22 08:30:02 EST 2011
Hi,
> The latter are error-prone because the bank number is one less than one
> would read in the documentation.
>
> Signed-off-by: Wolfram Sang <w.sang at pengutronix.de>
> Cc: Eric Bénard <eric at eukrea.com>
> Cc: Sascha Hauer <s.hauer at pengutronix.de>
> ---
> arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c | 4 ++--
> arch/arm/mach-mx3/mach-cpuimx35.c | 2 +-
> arch/arm/mach-mx3/mach-pcm043.c | 10 +++++-----
> 3 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
> index 14a5ffc..8076147 100644
> --- a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
> +++ b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
> @@ -165,8 +165,8 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
> MX35_PAD_SD1_DATA3__ESDHC1_DAT3,
> };
>
> -#define GPIO_LED1 (2 * 32 + 29)
> -#define GPIO_SWITCH1 (2 * 32 + 25)
> +#define GPIO_LED1 IMX_GPIO_NR(3, 29)
> +#define GPIO_SWITCH1 IMX_GPIO_NR(3, 25)
> #define GPIO_LCDPWR (4)
>
While you are at it you could also remove the nonsensical () around
the bare number.
Lothar Waßmann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
More information about the linux-arm-kernel
mailing list