Skip to content

Commit 614b06a

Browse files
Wolfram Sangsmb49
authored andcommitted
i2c: testunit: don't erase registers after STOP
BugLink: https://bugs.launchpad.net/bugs/2076435 [ Upstream commit c422b6a ] 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: b39ab96 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Portia Stephens <portia.stephens@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
1 parent 909fb39 commit 614b06a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/i2c-slave-testunit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static int i2c_slave_testunit_slave_cb(struct i2c_client *client,
118118
queue_delayed_work(system_long_wq, &tu->worker,
119119
msecs_to_jiffies(10 * tu->regs[TU_REG_DELAY]));
120120
}
121-
fallthrough;
121+
break;
122122

123123
case I2C_SLAVE_WRITE_REQUESTED:
124124
memset(tu->regs, 0, TU_NUM_REGS);

0 commit comments

Comments
 (0)