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