linux/drivers/staging/nvec
Alok Tiwari 3afd514c77 staging: nvec: Fix incorrect null termination of battery manufacturer
[ Upstream commit a8934352ba ]

The battery manufacturer string was incorrectly null terminated using
bat_model instead of bat_manu. This could result in an unintended
write to the wrong field and potentially incorrect behavior.

fixe the issue by correctly null terminating the bat_manu string.

Fixes: 32890b9830 ("Staging: initial version of the nvec driver")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20250719080755.3954373-1-alok.a.tiwari@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-08-28 16:24:07 +02:00
..
Kconfig staging: nvec: Fix Kconfig indentation 2019-11-20 15:20:29 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nvec-keytable.h staging: nvec: remove redundant license text 2018-01-15 16:03:45 +01:00
nvec.c staging: nvec: Fix a bunch of kernel-doc issues 2021-05-10 11:19:24 +02:00
nvec.h staging: nvec: convert to use GPIO descriptors 2018-04-23 14:38:00 +02:00
nvec_kbd.c staging: nvec: check return value 2019-12-19 19:23:29 +01:00
nvec_paz00.c staging: nvec: remove redundant license text 2018-01-15 16:03:45 +01:00
nvec_power.c staging: nvec: Fix incorrect null termination of battery manufacturer 2025-08-28 16:24:07 +02:00
nvec_ps2.c staging/nvec:: avoid Wempty-body warning 2021-03-22 17:05:15 +01:00
README Staging: nvec: Replace HTTP links with HTTPS ones 2020-07-10 13:52:46 +02:00
TODO Revert "staging: nvec: Augment TODO file with GPIO work item" 2018-04-23 18:49:51 +02:00

NVEC: An NVidia compliant Embedded Controller Protocol Implementation

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. https://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