[lantiq] Add missing 3.3 patches
[openwrt/svn-archive/archive.git] / target / linux / lantiq / patches-3.3 / 205-owrt-gpio-export.patch
1 --- a/drivers/gpio/gpiolib.c
2 +++ b/drivers/gpio/gpiolib.c
3 @@ -64,9 +64,9 @@ struct gpio_desc {
4 #define GPIO_FLAGS_MASK ((1 << ID_SHIFT) - 1)
5 #define GPIO_TRIGGER_MASK (BIT(FLAG_TRIG_FALL) | BIT(FLAG_TRIG_RISE))
6
7 -#ifdef CONFIG_DEBUG_FS
8 +//#ifdef CONFIG_DEBUG_FS
9 const char *label;
10 -#endif
11 +//#endif
12 };
13 static struct gpio_desc gpio_desc[ARCH_NR_GPIOS];
14
15 @@ -76,9 +76,9 @@ static DEFINE_IDR(dirent_idr);
16
17 static inline void desc_set_label(struct gpio_desc *d, const char *label)
18 {
19 -#ifdef CONFIG_DEBUG_FS
20 +//#ifdef CONFIG_DEBUG_FS
21 d->label = label;
22 -#endif
23 +//#endif
24 }
25
26 /* Warn when drivers omit gpio_request() calls -- legal but ill-advised
27 @@ -727,7 +727,6 @@ int gpio_export(unsigned gpio, bool dire
28
29 if (desc->chip->names && desc->chip->names[gpio - desc->chip->base])
30 ioname = desc->chip->names[gpio - desc->chip->base];
31 -
32 if (status == 0) {
33 struct device *dev;
34
35 @@ -1347,11 +1346,11 @@ const char *gpiochip_is_requested(struct
36 return NULL;
37 if (test_bit(FLAG_REQUESTED, &gpio_desc[gpio].flags) == 0)
38 return NULL;
39 -#ifdef CONFIG_DEBUG_FS
40 +//#ifdef CONFIG_DEBUG_FS
41 return gpio_desc[gpio].label;
42 -#else
43 - return "?";
44 -#endif
45 +//#else
46 +// return "?";
47 +//#endif
48 }
49 EXPORT_SYMBOL_GPL(gpiochip_is_requested);
50