public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: linux-kernel@vger.kernel.org, dbrownell@users.sourceforge.net
Subject: Re: [PATCH] gpio: include <linux/gpio.h> not <asm/gpio.h>
Date: Mon, 3 Aug 2009 14:50:50 -0700	[thread overview]
Message-ID: <20090803145050.8049bc20.akpm@linux-foundation.org> (raw)
In-Reply-To: <200907311059.51142.hartleys@visionengravers.com>

On Fri, 31 Jul 2009 10:59:50 -0700
H Hartley Sweeten <hartleys@visionengravers.com> wrote:

> Drivers should be including <linux/gpio.h> not <asm/gpio.h>.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.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 ;)

  reply	other threads:[~2009-08-03 21:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31 17:59 [PATCH] gpio: include <linux/gpio.h> not <asm/gpio.h> H Hartley Sweeten
2009-08-03 21:50 ` Andrew Morton [this message]
2009-08-03 22:17   ` H Hartley Sweeten
2009-08-04  1:12 ` David Brownell

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=20090803145050.8049bc20.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dbrownell@users.sourceforge.net \
    --cc=hartleys@visionengravers.com \
    --cc=linux-kernel@vger.kernel.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