710d2745c96b673df68b5910989069c452ae163e
[openwrt.git] / target / linux / lantiq / patches / 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,8 @@ 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 + else
33 + ioname = gpio_desc[gpio].label;
34 if (status == 0) {
35 struct device *dev;
36
37 @@ -1347,11 +1348,11 @@ const char *gpiochip_is_requested(struct
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
This page took 0.043601 seconds and 3 git commands to generate.