linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
	Arnd Bergmann <arnd@arndb.de>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>,
	linux-gpio@vger.kernel.org, linux-leds@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 1/3] gpiolib: Add missing dummies for the unified device properties interface
Date: Thu,  7 May 2015 10:08:08 +0200	[thread overview]
Message-ID: <1430986090-7243-2-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1430986090-7243-1-git-send-email-geert@linux-m68k.org>

If GPIOLIB=n:

    drivers/leds/leds-gpio.c: In function ‘gpio_leds_create’:
    drivers/leds/leds-gpio.c:187: error: implicit declaration of function ‘devm_get_gpiod_from_child’
    drivers/leds/leds-gpio.c:187: warning: assignment makes pointer from integer without a cast

Add dummies for fwnode_get_named_gpiod() and devm_get_gpiod_from_child()
for the !GPIOLIB case to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: 40b7318319281b1b ("gpio: Support for unified device properties interface")
---
 include/linux/gpio/consumer.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index 3a7c9ffd5ab930b4..da042657dc31d7f5 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -406,6 +406,21 @@ static inline int desc_to_gpio(const struct gpio_desc *desc)
 	return -EINVAL;
 }
 
+/* Child properties interface */
+struct fwnode_handle;
+
+static inline struct gpio_desc *fwnode_get_named_gpiod(
+	struct fwnode_handle *fwnode, const char *propname)
+{
+	return ERR_PTR(-ENOSYS);
+}
+
+static inline struct gpio_desc *devm_get_gpiod_from_child(
+	struct device *dev, const char *con_id, struct fwnode_handle *child)
+{
+	return ERR_PTR(-ENOSYS);
+}
+
 #endif /* CONFIG_GPIOLIB */
 
 /*
-- 
1.9.1

  reply	other threads:[~2015-05-07  8:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07  8:08 [PATCH 0/3] leds: leds-gpio: Allow compile test if !GPIOLIB Geert Uytterhoeven
2015-05-07  8:08 ` Geert Uytterhoeven [this message]
2015-05-08 17:43   ` [PATCH 1/3] gpiolib: Add missing dummies for the unified device properties interface Bryan Wu
2015-05-12  7:48     ` Geert Uytterhoeven
2015-05-12  7:47   ` Alexandre Courbot
2015-05-12 10:31   ` Linus Walleij
2015-05-12 17:48     ` Bryan Wu
2015-05-07  8:08 ` [PATCH 2/3] leds: leds-gpio: Add missing #include <linux/of.h> Geert Uytterhoeven
2015-05-07 12:15   ` Jacek Anaszewski
2015-05-12 17:49     ` Bryan Wu
2015-05-07  8:08 ` [PATCH 3/3] leds: leds-gpio: Allow compile test if !GPIOLIB Geert Uytterhoeven
2015-05-07 12:15   ` Jacek Anaszewski
2015-05-12 10:23   ` Linus Walleij
2015-05-12 17:53     ` Bryan Wu

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=1430986090-7243-2-git-send-email-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=cooloney@gmail.com \
    --cc=gnurou@gmail.com \
    --cc=j.anaszewski@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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).