[FE training-materials-updates] Kernel input lab: simplify instructions

Michael Opdenacker michael.opdenacker at free-electrons.com
Thu Oct 9 16:55:53 CEST 2014


Repository : git://git.free-electrons.com/training-materials.git

On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=ac44ac8a44532d0496342b5c001147e5255df79c

>---------------------------------------------------------------

commit ac44ac8a44532d0496342b5c001147e5255df79c
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date:   Thu Oct 9 16:54:21 2014 +0200

    Kernel input lab: simplify instructions
    
    - Stop using our device structure while the polling function
      already has the polled_input structure
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>


>---------------------------------------------------------------

ac44ac8a44532d0496342b5c001147e5255df79c
 labs/kernel-i2c-input-interface/input-notification.c           | 6 +++---
 labs/kernel-i2c-input-interface/kernel-i2c-input-interface.tex | 3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/labs/kernel-i2c-input-interface/input-notification.c b/labs/kernel-i2c-input-interface/input-notification.c
index a1728c1..4316a03 100644
--- a/labs/kernel-i2c-input-interface/input-notification.c
+++ b/labs/kernel-i2c-input-interface/input-notification.c
@@ -1,6 +1,6 @@
-        input_event(nunchuk->polled_input->input,
+        input_event(polled_input->input,
                     EV_KEY, BTN_Z, zpressed);
-        input_event(nunchuk->polled_input->input,
+        input_event(polled_input->input,
                     EV_KEY, BTN_C, cpressed);
 
-        input_sync(nunchuk->polled_input->input);
+        input_sync(polled_input->input);
diff --git a/labs/kernel-i2c-input-interface/kernel-i2c-input-interface.tex b/labs/kernel-i2c-input-interface/kernel-i2c-input-interface.tex
index 9b930a2..2bff805 100644
--- a/labs/kernel-i2c-input-interface/kernel-i2c-input-interface.tex
+++ b/labs/kernel-i2c-input-interface/kernel-i2c-input-interface.tex
@@ -189,7 +189,8 @@ reading registers fails, you can use a \code{return;} statement instead
 of \code{return value;}}.
 
 At the end of the polling routine, the last thing to do is post the events
-and notify the \code{input} core:
+and notify the \code{input} core. Assuming that \code{polled_input} is the
+name of the \code{input_polled_dev} parameter of your polling routine:
 
 \sourcecode{labs/kernel-i2c-input-interface/input-notification.c}
 



More information about the training-materials-updates mailing list