From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] gpio: rewrite U300 GPIO to use gpiolib
Date: Tue, 6 Sep 2011 09:49:38 +0100 [thread overview]
Message-ID: <20110906084938.GI6619@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1315297950-12720-1-git-send-email-linus.walleij@stericsson.com>
On Tue, Sep 06, 2011 at 10:32:30AM +0200, Linus Walleij wrote:
> This is based on top of the pending GPIO cleanups in Russells
> tree, if I can get some ACK on this I presume Russell can
> apply it to his branch.
> diff --git a/arch/arm/mach-u300/include/mach/gpio.h b/arch/arm/mach-u300/include/mach/gpio.h
> index 430a054..ba224b5 100644
> --- a/arch/arm/mach-u300/include/mach/gpio.h
> +++ b/arch/arm/mach-u300/include/mach/gpio.h
> @@ -13,35 +13,15 @@
> #ifndef __MACH_U300_GPIO_H
> #define __MACH_U300_GPIO_H
>
> +#include <linux/io.h>
> +#include <mach/hardware.h>
> +#include <asm/irq.h>
> +#include <asm-generic/gpio.h>
>
> +/* Map these overrides to gpiolib functions, simply */
> +#define gpio_get_value __gpio_get_value
> +#define gpio_set_value __gpio_set_value
> +#define gpio_cansleep __gpio_cansleep
> +#define gpio_to_irq __gpio_to_irq
>
> +#endif
This is how mach/gpio.h ends up looking - two things:
1. is there any reason for asm/irq.h and linux/io.h in there?
2. asm/gpio.h already includes asm-generic/gpio.h and defines
the dispatchers for the trivial case.
So, I think this is how it should look:
#ifndef __MACH_U300_GPIO_H
#define __MACH_U300_GPIO_H
#include <mach/hardware.h>
#endif
Or even just:
/* empty */
if mach/hardware.h include is not required for ARCH_NR_GPIOS.
next prev parent reply other threads:[~2011-09-06 8:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-06 8:32 [PATCH] gpio: rewrite U300 GPIO to use gpiolib Linus Walleij
2011-09-06 8:49 ` Russell King - ARM Linux [this message]
2011-09-06 9:15 ` Linus Walleij
2011-09-06 9:51 ` Arnaud Patard (Rtp)
2011-09-07 8:11 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110906084938.GI6619@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).