aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/goldfish_events.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-02-13Input: goldfish_events - replace zero-length array with flexible-array memberGustavo A. R. Silva1-1/+1
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Link: https://lore.kernel.org/r/20200213002430.GA31056@embeddedor.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282Thomas Gleixner1-10/+1
Based on 1 normalized pattern(s): this software is licensed under the terms of the gnu general public license version 2 as published by the free software foundation and may be copied distributed and modified under those terms this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 285 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141900.642774971@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-04Input: goldfish_events - fix checkpatch warningsRoman Kiryanov1-4/+5
Address issues pointed by checkpatch.pl Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-02Input: goldfish_events - enable ACPI-based enumeration for goldfish eventsJason Hu1-0/+10
Add ACPI binding to the goldfish events driver. Signed-off-by: Jason Hu <jia-cheng.hu@intel.com> Signed-off-by: Jin Qian <jinqian@android.com> Signed-off-by: Alan <alan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-02Input: goldfish_events - add devicetree bindingsGreg Hackmann1-0/+7
Add device tree bindings to the Goldfish virtual platform event driver. Signed-off-by: Greg Hackmann <ghackmann@google.com> Signed-off-by: Jin Qian <jinqian@android.com> Signed-off-by: Alan <alan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-20input: keyboard: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-01-06Input: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-25Input: goldfish - virtual input event driverBrian Swetland1-0/+194
This device is a direct pipe from "hardware" to the input event subsystem, allowing us to avoid having to route "keypad" style events through an AT keyboard driver (gross!). As with the other submissions this driver is cross architecture. Signed-off-by: Mike A. Chan <mikechan@google.com> [Tided up to work on x86] Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> [Ported to 3.4] Signed-off-by: Tom Keel <thomas.keel@intel.com> [Cleaned up for 3.7 and submission] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>