aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNelson Penn2022-05-22 19:50:38 +0000
committerJonathan Corbet2022-06-01 09:34:28 -0600
commita27e51b45e1bc57f15cffd6b9bfc38efef8cc419 (patch)
treef5b4a9bb0bcdf0ddd4efbada49f95a6149836302
parent6199e138fe3b7479f1c6980f8407a8e0b2ade1e8 (diff)
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>
-rw-r--r--Documentation/input/input-programming.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/input/input-programming.rst b/Documentation/input/input-programming.rst
index 2638dce69764..c9264814c7aa 100644
--- a/Documentation/input/input-programming.rst
+++ b/Documentation/input/input-programming.rst
@@ -85,15 +85,15 @@ accepted by this input device. Our example device can only generate EV_KEY
type events, and from those only BTN_0 event code. Thus we only set these
two bits. We could have used::
- set_bit(EV_KEY, button_dev.evbit);
- set_bit(BTN_0, button_dev.keybit);
+ set_bit(EV_KEY, button_dev->evbit);
+ set_bit(BTN_0, button_dev->keybit);
as well, but with more than single bits the first approach tends to be
shorter.
Then the example driver registers the input device structure by calling::
- input_register_device(&button_dev);
+ input_register_device(button_dev);
This adds the button_dev structure to linked lists of the input driver and
calls device handler modules _connect functions to tell them a new input