[3.19.y-ckt stable] Patch "gpiolib: Add missing dummies for the unified device properties interface" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Thu Jul 16 01:07:14 UTC 2015


This is a note to let you know that I have just added a patch titled

    gpiolib: Add missing dummies for the unified device properties interface

to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue

This patch is scheduled to be released in version 3.19.y-ckt4.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From f74d7a7a00729ef2c89a81f411b5dc182558849d Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert at linux-m68k.org>
Date: Thu, 7 May 2015 01:08:08 -0700
Subject: gpiolib: Add missing dummies for the unified device properties
 interface
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

commit 496e7ce2a46562938edcb74f65b26068ee8895f6 upstream.

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 at linux-m68k.org>
Fixes: 40b7318319281b1b ("gpio: Support for unified device properties interface")
Acked-by: Alexandre Courbot <acourbot at nvidia.com>
Acked-by: Linus Walleij <linus.walleij at linaro.org>
Signed-off-by: Bryan Wu <cooloney at gmail.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 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 fd85cb1..8f36c1d 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -329,6 +329,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





More information about the kernel-team mailing list