summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-slave-testunit.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2024-06-27 13:14:47 +0200
committerWolfram Sang <wsa+renesas@sang-engineering.com>2024-06-28 20:44:34 +0200
commitc422b6a630240f706063e0ecbb894aa8491b1fa1 (patch)
treea7705f57a608839783a68116c5f95f0ad040b61e /drivers/i2c/i2c-slave-testunit.c
parent4e9a1a47c52997bc5b10d56a7a79542ae393fc99 (diff)
downloadlwn-c422b6a630240f706063e0ecbb894aa8491b1fa1.tar.gz
lwn-c422b6a630240f706063e0ecbb894aa8491b1fa1.zip
i2c: testunit: don't erase registers after STOP
STOP fallsthrough to WRITE_REQUESTED but this became problematic when clearing the testunit registers was added to the latter. Actually, there is no reason to clear the testunit state after STOP. Doing it when a new WRITE_REQUESTED arrives is enough. So, no need to fallthrough, at all. Fixes: b39ab96aa894 ("i2c: testunit: add support for block process calls") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Diffstat (limited to 'drivers/i2c/i2c-slave-testunit.c')
-rw-r--r--drivers/i2c/i2c-slave-testunit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-slave-testunit.c b/drivers/i2c/i2c-slave-testunit.c
index a49642bbae4b..a5dcbc3c2c14 100644
--- a/drivers/i2c/i2c-slave-testunit.c
+++ b/drivers/i2c/i2c-slave-testunit.c
@@ -118,7 +118,7 @@ static int i2c_slave_testunit_slave_cb(struct i2c_client *client,
queue_delayed_work(system_long_wq, &tu->worker,
msecs_to_jiffies(10 * tu->regs[TU_REG_DELAY]));
}
- fallthrough;
+ break;
case I2C_SLAVE_WRITE_REQUESTED:
memset(tu->regs, 0, TU_NUM_REGS);