[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090803145050.8049bc20.akpm@linux-foundation.org>
Date: Mon, 3 Aug 2009 14:50:50 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: H Hartley Sweeten <hartleys@...ionengravers.com>
Cc: linux-kernel@...r.kernel.org, dbrownell@...rs.sourceforge.net
Subject: Re: [PATCH] gpio: include <linux/gpio.h> not <asm/gpio.h>
On Fri, 31 Jul 2009 10:59:50 -0700
H Hartley Sweeten <hartleys@...ionengravers.com> wrote:
> Drivers should be including <linux/gpio.h> not <asm/gpio.h>.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
>
> ---
>
> diff --git a/drivers/gpio/bt8xxgpio.c b/drivers/gpio/bt8xxgpio.c
> index 984b587..fd1c54d 100644
> --- a/drivers/gpio/bt8xxgpio.c
> +++ b/drivers/gpio/bt8xxgpio.c
> @@ -46,8 +46,7 @@
> #include <linux/module.h>
> #include <linux/pci.h>
> #include <linux/spinlock.h>
> -
> -#include <asm/gpio.h>
> +#include <linux/gpio.h>
There's some potential for breakage here. include/linux/gpio.h has
#ifdef CONFIG_GENERIC_GPIO
#include <asm/gpio.h>
#else
...
#endif
So if there's some configuration which forgot to set
CONFIG_GENERIC_GPIO, the driver will be switched over to use the
include/linux/gpio.h stubs and will break.
Please convince me that this cannot happen ;)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists