Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

documentation: Format button_dev as a pointer.

The docs on creating an input device driver have an example in which
button_dev is a pointer to an input_dev struct. However, in two code
snippets below, button_dev is used as if it is not a pointer. Make these
occurrences of button_dev reflect that it is a pointer.

Signed-off-by: Nelson Penn <nelsonapenn@protonmail.com>
Link: https://lore.kernel.org/r/20220522194953.12097-1-nelsonapenn@protonmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Nelson Penn and committed by
Jonathan Corbet
a27e51b4 6199e138

+3 -3
+3 -3
Documentation/input/input-programming.rst
··· 85 85 type events, and from those only BTN_0 event code. Thus we only set these 86 86 two bits. We could have used:: 87 87 88 - set_bit(EV_KEY, button_dev.evbit); 89 - set_bit(BTN_0, button_dev.keybit); 88 + set_bit(EV_KEY, button_dev->evbit); 89 + set_bit(BTN_0, button_dev->keybit); 90 90 91 91 as well, but with more than single bits the first approach tends to be 92 92 shorter. 93 93 94 94 Then the example driver registers the input device structure by calling:: 95 95 96 - input_register_device(&button_dev); 96 + input_register_device(button_dev); 97 97 98 98 This adds the button_dev structure to linked lists of the input driver and 99 99 calls device handler modules _connect functions to tell them a new input