Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[safe/jmp/linux-2.6] / include / linux / gpio.h
index 98be6c5..059bd18 100644 (file)
@@ -8,9 +8,12 @@
 
 #else
 
+#include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 
+struct device;
+
 /*
  * Some platforms don't support the GPIO programming interface.
  *
@@ -32,6 +35,8 @@ static inline int gpio_request(unsigned gpio, const char *label)
 
 static inline void gpio_free(unsigned gpio)
 {
+       might_sleep();
+
        /* GPIO can never have been requested */
        WARN_ON(1);
 }
@@ -79,6 +84,28 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value)
        WARN_ON(1);
 }
 
+static inline int gpio_export(unsigned gpio, bool direction_may_change)
+{
+       /* GPIO can never have been requested or set as {in,out}put */
+       WARN_ON(1);
+       return -EINVAL;
+}
+
+static inline int gpio_export_link(struct device *dev, const char *name,
+                               unsigned gpio)
+{
+       /* GPIO can never have been exported */
+       WARN_ON(1);
+       return -EINVAL;
+}
+
+
+static inline void gpio_unexport(unsigned gpio)
+{
+       /* GPIO can never have been exported */
+       WARN_ON(1);
+}
+
 static inline int gpio_to_irq(unsigned gpio)
 {
        /* GPIO can never have been requested or set as input */