Root/target/linux/lantiq/patches/205-owrt-gpio-export.patch

1Index: linux-3.1.10/drivers/gpio/gpiolib.c
2===================================================================
3--- linux-3.1.10.orig/drivers/gpio/gpiolib.c 2012-01-18 16:33:18.000000000 +0100
4+++ linux-3.1.10/drivers/gpio/gpiolib.c 2012-02-03 20:22:42.554529747 +0100
5@@ -64,9 +64,9 @@
6 #define GPIO_FLAGS_MASK ((1 << ID_SHIFT) - 1)
7 #define GPIO_TRIGGER_MASK (BIT(FLAG_TRIG_FALL) | BIT(FLAG_TRIG_RISE))
8 
9-#ifdef CONFIG_DEBUG_FS
10+//#ifdef CONFIG_DEBUG_FS
11     const char *label;
12-#endif
13+//#endif
14 };
15 static struct gpio_desc gpio_desc[ARCH_NR_GPIOS];
16 
17@@ -76,9 +76,9 @@
18 
19 static inline void desc_set_label(struct gpio_desc *d, const char *label)
20 {
21-#ifdef CONFIG_DEBUG_FS
22+//#ifdef CONFIG_DEBUG_FS
23     d->label = label;
24-#endif
25+//#endif
26 }
27 
28 /* Warn when drivers omit gpio_request() calls -- legal but ill-advised
29@@ -727,7 +727,6 @@
30 
31     if (desc->chip->names && desc->chip->names[gpio - desc->chip->base])
32         ioname = desc->chip->names[gpio - desc->chip->base];
33-
34     if (status == 0) {
35         struct device *dev;
36 
37@@ -1347,11 +1346,11 @@
38         return NULL;
39     if (test_bit(FLAG_REQUESTED, &gpio_desc[gpio].flags) == 0)
40         return NULL;
41-#ifdef CONFIG_DEBUG_FS
42+//#ifdef CONFIG_DEBUG_FS
43     return gpio_desc[gpio].label;
44-#else
45- return "?";
46-#endif
47+//#else
48+// return "?";
49+//#endif
50 }
51 EXPORT_SYMBOL_GPL(gpiochip_is_requested);
52 
53

Archive Download this file



interactive