[PATCH] gpio: clps711x: localise <mach/gpio.h> header

Linus Walleij linus.walleij at linaro.org
Mon Oct 15 16:36:32 EDT 2012


On Mon, Oct 15, 2012 at 10:04 PM, Alexander Shiyan <shc_work at mail.ru> wrote:
> On Mon, 15 Oct 2012 21:40:20 +0200
> Linus Walleij <linus.walleij at linaro.org> wrote:
>
>> The commit adding the CLPS711x driver also added <mach/gpio.h>
>> to the CLPS711x, and we want to get rid of all <mach/*>
>> headers for the future. It turns out that the one macro defined
>> in the file was only used in the GPIO driver itself, so just
>> delete it and copy the macro into the driver.
> ...
>> -/* Simple helper for convert port & pin to GPIO number */
>> -#define CLPS711X_GPIO(port, bit)     ((port) * 8 + (bit))
>
> This macro is not used by driver and was be designed especially for future
> easy modify existing drivers that use GPIO to gpio-driver.

Then I will delete it for now (see separate patch).

If we shall have a file with macros used like that it needs
to atleast be something like
<linux/platform_data/gpio-clps711x.h>

We don't want to add new files to <mach/*>.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list