mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: David Woodhouse <David.Woodhouse@intel.com>
Cc: Mike Frysinger <vapier@gentoo.org>,
	Bryan Wu <cooloney@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] mtd/maps: gpio-addr-flash: Fix up the GENERIC_GPIO=n build.
Date: Fri, 25 Sep 2009 12:58:25 +0900	[thread overview]
Message-ID: <20090925035825.GB12810@linux-sh.org> (raw)

linux/gpio.h takes care of wrapping in to asm/gpio.h or defining a stubbed out
interface. gpio-addr-flush unfortunately references asm/gpio.h directly and as
a result blows up when CONFIG_GENERIC_GPIO is disabled.

  CC      drivers/mtd/maps/gpio-addr-flash.o
In file included from /home/pmundt/devel/git/sh-2.6/arch/sh/include/asm/gpio.h:24,
                 from drivers/mtd/maps/gpio-addr-flash.c:27:
include/asm-generic/gpio.h: In function 'gpio_get_value_cansleep':
include/asm-generic/gpio.h:170: error: implicit declaration of function 'gpio_get_value'
include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep':
include/asm-generic/gpio.h:176: error: implicit declaration of function 'gpio_set_value'
In file included from drivers/mtd/maps/gpio-addr-flash.c:27:
/home/pmundt/devel/git/sh-2.6/arch/sh/include/asm/gpio.h: At top level:
/home/pmundt/devel/git/sh-2.6/arch/sh/include/asm/gpio.h:131: error: field 'chip' has incomplete type
drivers/mtd/maps/gpio-addr-flash.c: In function 'gpio_flash_probe':
drivers/mtd/maps/gpio-addr-flash.c:232: error: implicit declaration of function 'gpio_request'
drivers/mtd/maps/gpio-addr-flash.c:236: error: implicit declaration of function 'gpio_free'
drivers/mtd/maps/gpio-addr-flash.c:240: error: implicit declaration of function 'gpio_direction_output'
make[3]: *** [drivers/mtd/maps/gpio-addr-flash.o] Error 1
make[2]: *** [drivers/mtd/maps] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2

I've opted to just switch to the linux/ version instead of adding a depends on,
as the driver still builds and does the error handling properly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Bryan Wu <cooloney@kernel.org>

---

 drivers/mtd/maps/gpio-addr-flash.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c
index 44ef9a4..3d7c911 100644
--- a/drivers/mtd/maps/gpio-addr-flash.c
+++ b/drivers/mtd/maps/gpio-addr-flash.c
@@ -22,8 +22,7 @@
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
 #include <linux/types.h>
-
-#include <asm/gpio.h>
+#include <linux/gpio.h>
 #include <asm/io.h>
 
 #define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); })

             reply	other threads:[~2009-09-25  3:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-25  3:58 Paul Mundt [this message]
2009-09-25  4:12 ` Mike Frysinger

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=20090925035825.GB12810@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=David.Woodhouse@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=cooloney@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vapier@gentoo.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

all inboxes | Powered by JetHome®