mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]>
This commit is contained in:
parent
d27c17285e
commit
214338e372
3 changed files with 19 additions and 17 deletions
|
|
@ -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';
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue