]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: pxa/raumfeld: use PROPERTY_ENTRY_INTEGER to define props
authorArnd Bergmann <arnd@arndb.de>
Tue, 15 Mar 2016 23:46:12 +0000 (16:46 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 15 Mar 2016 23:56:46 +0000 (16:56 -0700)
commite460d848f921fd6ac000cb449ee5d9e2d6e4634e
tree682d1b4a344337b4e74518b5f7385e4c8586ca4e
parentd3065a329795e0bd887a86b0f2011dde3bfa358e
ARM: pxa/raumfeld: use PROPERTY_ENTRY_INTEGER to define props

gcc-6.0 notices that the use of the property_entry in this file that
was recently introduced cannot work right, as we initialize the wrong
field:

raumfeld.c:387:3: error: the address of 'raumfeld_rotary_encoder_steps' will always evaluate as 'true' [-Werror=address]
   DEV_PROP_U32, 1, &raumfeld_rotary_encoder_steps, },
   ^~~~~~~~~~~~
raumfeld.c:389:3: error: the address of 'raumfeld_rotary_encoder_axis' will always evaluate as 'true' [-Werror=address]
   DEV_PROP_U32, 1, &raumfeld_rotary_encoder_axis, },
   ^~~~~~~~~~~~
raumfeld.c:391:3: error: the address of 'raumfeld_rotary_encoder_relative_axis' will always evaluate as 'true' [-Werror=address]
   DEV_PROP_U32, 1, &raumfeld_rotary_encoder_relative_axis, },
   ^~~~~~~~~~~~

The problem appears to stem from relying on an old definition of
'struct property', but it has changed several times since the code
could have last been correct.

This changes the code to use the PROPERTY_ENTRY_INTEGER() macro instead,
which works fine for the current definition and is a safer way of doing
the initialization.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8bf779ba2ba6 ("Input: rotary_encoder - move away from platform data structure")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
arch/arm/mach-pxa/raumfeld.c