linux/drivers/input/keyboard
Javier Martinez Canillas a841178445 mfd: cros_ec: Use a zero-length array for command data
Commit 1b84f2a4cd ("mfd: cros_ec: Use fixed size arrays to transfer
data with the EC") modified the struct cros_ec_command fields to not
use pointers for the input and output buffers and use fixed length
arrays instead.

This change was made because the cros_ec ioctl API uses that struct
cros_ec_command to allow user-space to send commands to the EC and
to get data from the EC. So using pointers made the API not 64-bit
safe. Unfortunately this approach was not flexible enough for all
the use-cases since there may be a need to send larger commands
on newer versions of the EC command protocol.

So to avoid to choose a constant length that it may be too big for
most commands and thus wasting memory and CPU cycles on copy from
and to user-space or having a size that is too small for some big
commands, use a zero-length array that is both 64-bit safe and
flexible. The same buffer is used for both output and input data
so the maximum of these values should be used to allocate it.

Suggested-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-15 13:18:19 +01:00
..
adp5520-keys.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
adp5588-keys.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-10-19 12:40:24 -07:00
adp5589-keys.c driver:gpio remove all usage of gpio_remove retval in driver 2014-09-18 11:03:10 -07:00
amikbd.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-12-17 10:06:02 -08:00
atakbd.c Input: atari - enable the 102nd key for German keyboards 2015-01-18 00:10:28 -08:00
atkbd.c Input: atkbd - document "no new force-release quirks" policy 2015-04-11 00:03:08 -07:00
bcm-keypad.c Input: add driver for Broadcom keypad controller 2015-03-02 15:16:52 -08:00
bf54x-keys.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
cap11xx.c Input: cap11xx - remove wrong and unneeded cap11xx modalias 2015-02-01 11:21:23 -08:00
clps711x-keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
cros_ec_keyb.c mfd: cros_ec: Use a zero-length array for command data 2015-06-15 13:18:19 +01:00
davinci_keyscan.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
ep93xx_keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
goldfish_events.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
gpio_keys_polled.c gpio: add parameter to allow the use named gpios 2015-03-04 13:58:58 +01:00
gpio_keys.c input: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
hil_kbd.c Input: hil_kbd - fix incorrect use of init_completion 2014-12-27 20:43:35 -08:00
hilkbd.c Input: remove use of __devexit 2012-11-24 00:05:38 -08:00
hpps2atkbd.h
imx_keypad.c linux 3.19-rc4 2015-01-15 09:46:14 -08:00
ipaq-micro-keys.c Input: driver for microcontroller keys on the iPaq h3xxx 2015-03-06 11:25:31 -08:00
jornada680_kbd.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
jornada720_kbd.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
Kconfig Input: driver for microcontroller keys on the iPaq h3xxx 2015-03-06 11:25:31 -08:00
lkkbd.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
lm8323.c Input: lm8323 - missing error check in lm8323_set_disable() 2014-12-03 15:28:26 -08:00
lm8333.c Input: lm8333 - fix broken email address 2015-04-20 10:30:10 -07:00
locomokbd.c Input: remove use of __devexit 2012-11-24 00:05:38 -08:00
lpc32xx-keys.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-12-17 10:06:02 -08:00
Makefile Input: driver for microcontroller keys on the iPaq h3xxx 2015-03-06 11:25:31 -08:00
maple_keyb.c
matrix_keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
max7359_keypad.c Input: max7359 - introduce the use of managed interfaces 2014-07-20 13:17:00 -07:00
mcs_touchkey.c Input: mcs_touchkey - fix incorrect input device name 2014-05-28 23:48:02 -07:00
mpr121_touchkey.c Input: mpr121 - switch to using managed resources 2014-10-22 10:50:05 -07:00
newtonkbd.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
nomadik-ske-keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
nspire-keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
omap4-keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
omap-keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
opencores-kbd.c Input: opencores-kbd - fix error handling 2014-10-28 10:32:59 -07:00
pmic8xxx-keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
pxa27x_keypad.c Input: pxa27x_keypad - remove an unneeded NULL check 2015-02-11 23:07:12 -08:00
pxa930_rotary.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
qt1070.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
qt2160.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
samsung-keypad.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sh_keysc.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
spear-keyboard.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
st-keyscan.c Input: st-keyscan - fix 'defined but not used' compiler warnings 2014-07-18 10:18:55 -07:00
stmpe-keypad.c Merge branch 'next' into for-linus 2014-12-18 10:02:39 -08:00
stowaway.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
sun4i-lradc-keys.c Input: add new sun4i-lradc-keys driver 2014-12-21 18:59:21 -08:00
sunkbd.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
tc3589x-keypad.c mfd: tc3589x: enforce device-tree only mode 2015-04-03 17:08:59 -07:00
tca6416-keypad.c Input: use dev_get_platdata() 2013-12-06 02:06:29 -08:00
tca8418_keypad.c Input: tca8418 - fix loading this driver as a module from a device tree 2014-04-24 23:53:14 -07:00
tegra-kbc.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
twl4030_keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
w90p910_keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
xtkbd.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00