alistair23-linux/drivers/staging/nvec
Somya Anand 4c42d97981 Staging: nvec: use !x instead of x == NULL
Functions like devm_kzalloc, kmalloc_array, devm_ioremap,
usb_alloc_urb, alloc_netdev return NULL as a return value on failure.
Generally, When NULL represents failure, !x is commonly used.

This patch cleans up the tests on the results of these functions, thereby
using !x instead of x == NULL or NULL == x. This is done via following
coccinelle script:
@prob_7@
identifier x;
statement S;
@@

(
 x = devm_kzalloc(...);
|
 x = usb_alloc_urb(...);
|
 x = kmalloc_array(...);
|
 x = devm_ioremap(...);
|
 x = alloc_netdev(...);
)
 ...
- if(NULL == x)
+ if(!x)
        S
Further we have used isomorphism characteristics of coccinelle to
indicate x == NULL and NULL == x are equivalent. This is done via
following iso script.

Expression
@ is_null @ expression X; @@
X == NULL <=> NULL == X

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:28:47 +01:00
..
Kconfig Staging: nvec: Add paragraph to describe kconfig symbol 2015-02-26 17:14:07 -08:00
Makefile staging: nvec: rename led driver to board specific paz00 driver 2012-06-25 10:55:38 -07:00
nvec-keytable.h staging: nvec: coding style fixes / add copyright notice 2011-09-29 17:40:37 -07:00
nvec.c Staging: nvec: use !x instead of x == NULL 2015-03-16 16:28:47 +01:00
nvec.h staging: nvec: use reset framework 2013-12-11 16:44:10 -07:00
nvec_kbd.c staging: nvec: drop owner assignment from platform_drivers 2014-10-20 16:21:41 +02:00
nvec_paz00.c Staging: nvec: use !x instead of x == NULL 2015-03-16 16:28:47 +01:00
nvec_power.c Staging: nvec: use !x instead of x == NULL 2015-03-16 16:28:47 +01:00
nvec_ps2.c Staging: nvec: use !x instead of x == NULL 2015-03-16 16:28:47 +01:00
README
TODO staging: nvec: remove use of clk_get_sys 2013-01-28 11:19:33 -07:00

NVEC: An NVidia compliant Embedded Controller Protocol Implemenation

This is an implementation of the NVEC protocol used to communicate with an
embedded controller (EC) via I2C bus. The EC is an I2C master while the host
processor is the I2C slave. Requests from the host processor to the EC are
started by triggering a gpio line.

There is no written documentation of the protocol available to the public,
but the source code[1] of the published nvec reference drivers can be a guide.
This driver is currently only used by the AC100 project[2], but it is likely,
that other Tegra boards (not yet mainlined, if ever) also use it.

[1] e.g. http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=tree;f=arch/arm/mach-tegra/nvec;hb=android-tegra-2.6.32
[2] http://gitorious.org/ac100, http://launchpad.net/ac100