aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorLinus Walleij2016-02-25 21:01:48 +0100
committerLinus Walleij2016-02-25 21:07:23 +0100
commit214338e372af2b856af07978daa771dbe087f990 (patch)
tree07ad030d3338a037874c3b1e80e5ad9e976f5fdc /drivers/gpio
parentd27c17285eb7ebb6aa513da7a3338e2a507b1216 (diff)
gpio: present the consumer of a line to userspace
I named the field representing the current user of GPIO line as "label" but this is too vague and ambiguous. Before anyone gets confused, rename it to "consumer" and indicate clearly in the documentation that this is a string set by the user of the line. Also clean up leftovers in the documentation. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 872774a404f1..bc788b958c7e 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -368,11 +368,11 @@ static long gpio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
lineinfo.name[0] = '\0';
}
if (desc->label) {
- strncpy(lineinfo.label, desc->label,
- sizeof(lineinfo.label));
- lineinfo.label[sizeof(lineinfo.label)-1] = '\0';
+ strncpy(lineinfo.consumer, desc->label,
+ sizeof(lineinfo.consumer));
+ lineinfo.consumer[sizeof(lineinfo.consumer)-1] = '\0';
} else {
- lineinfo.label[0] = '\0';
+ lineinfo.consumer[0] = '\0';
}
/*