lkml.org 
[lkml]   [2012]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] gpiolib: Add !CONFIG_GPIOLIB definitions of devm_ functions
Date
Currently the managed gpio_request() and gpio_free() are not stubbed out
for configurations not using gpiolib - do that to aid use in drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---

I thought you'd applied this but it's not showing up in -next.

include/linux/gpio.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index d1890d46..8e0fe1b 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -66,6 +66,12 @@ static inline int devm_gpio_request(struct device *dev, unsigned gpio,
return -ENOSYS;
}

+static inline int devm_gpio_request(struct device *dev, unsigned gpio,
+ const char *label)
+{
+ return -ENOSYS;
+}
+
static inline int gpio_request_one(unsigned gpio,
unsigned long flags, const char *label)
{
@@ -93,6 +99,14 @@ static inline void devm_gpio_free(struct device *dev, unsigned gpio)
WARN_ON(1);
}

+static inline void devm_gpio_free(struct device *dev, unsigned gpio)
+{
+ might_sleep();
+
+ /* GPIO can never have been requested */
+ WARN_ON(1);
+}
+
static inline void gpio_free_array(const struct gpio *array, size_t num)
{
might_sleep();
--
1.7.10


\
 
 \ /
  Last update: 2012-05-02 14:21    [W:0.080 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site