From 33a470713ad589e99a989189f58d4ee1bc8df1a8 Mon Sep 17 00:00:00 2001 From: Dorine Tipo Date: Sun, 31 Mar 2024 17:05:48 +0000 Subject: staging: nvec: Fix documentation typo in nvec.c This commit corrects the spelling of "initialisation" which was misspelled as "intialisation" in the irqreturn_t nvec_interrupt() documentation. The issue was found using checkpatch. Signed-off-by: Dorine Tipo Link: https://lore.kernel.org/r/20240331170548.81409-1-dorine.a.tipo@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/nvec/nvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/nvec/nvec.c') diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 282a664c9176..b4485b10beb8 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -712,7 +712,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) * TODO: replace the udelay with a read back after each writel above * in order to work around a hardware issue, see i2c-tegra.c * - * Unfortunately, this change causes an intialisation issue with the + * Unfortunately, this change causes an initialisation issue with the * touchpad, which needs to be fixed first. */ udelay(100); -- cgit v1.2.3 From 244b6e92bd1a0b6ff1f6253b10a96dc208a315f2 Mon Sep 17 00:00:00 2001 From: Marc Dietrich Date: Sat, 6 Apr 2024 14:31:19 +0200 Subject: staging: nvec: add ability to ignore EC responses in sync writes In case we just want to submit a message to the EC but are not interested in its response, we can free the response buffer early. Signed-off-by: Marc Dietrich Link: https://lore.kernel.org/r/20240406123123.37148-2-marvin24@gmx.de Signed-off-by: Greg Kroah-Hartman --- drivers/staging/nvec/nvec.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'drivers/staging/nvec/nvec.c') diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index b4485b10beb8..e5ca78e57384 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -300,7 +300,9 @@ int nvec_write_sync(struct nvec_chip *nvec, { mutex_lock(&nvec->sync_write_mutex); - *msg = NULL; + if (msg != NULL) + *msg = NULL; + nvec->sync_write_pending = (data[1] << 8) + data[0]; if (nvec_write_async(nvec, data, size) < 0) { @@ -320,7 +322,10 @@ int nvec_write_sync(struct nvec_chip *nvec, dev_dbg(nvec->dev, "nvec_sync_write: pong!\n"); - *msg = nvec->last_sync_msg; + if (msg != NULL) + *msg = nvec->last_sync_msg; + else + nvec_msg_free(nvec, nvec->last_sync_msg); mutex_unlock(&nvec->sync_write_mutex); -- cgit v1.2.3