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>
This commit is contained in:
Linus Walleij
2016-02-25 21:01:48 +01:00
parent d27c17285e
commit 214338e372
3 changed files with 19 additions and 17 deletions

View File

@@ -116,10 +116,10 @@ int list_device(const char *device_name)
fprintf(stdout, " \"%s\"", linfo.name);
else
fprintf(stdout, " unnamed");
if (linfo.label[0])
fprintf(stdout, " \"%s\"", linfo.label);
if (linfo.consumer[0])
fprintf(stdout, " \"%s\"", linfo.consumer);
else
fprintf(stdout, " unlabeled");
fprintf(stdout, " unused");
if (linfo.flags) {
fprintf(stdout, " [");
print_flags(linfo.flags);