diff options
author | Edward Hill <ecgh@chromium.org> | 2020-08-14 15:33:09 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-15 01:47:31 +0000 |
commit | 55554e281b65e4ca780bc1dfee28c2599e781efc (patch) | |
tree | a11b86da0b53206af0a6e98e3adffc340a764929 /common | |
parent | 29ad5a3e08fef053ffe8d56d004d868a8794481a (diff) | |
download | chrome-ec-55554e281b65e4ca780bc1dfee28c2599e781efc.tar.gz |
task: Change mutex_lock() assert
Instead of asserting that task_start() has not been called,
just return without doing any locking.
This avoids the need to fix every caller of mutex_lock() to check
task_start_called().
BUG=b:164461158
BRANCH=none
TEST=Esc+F3+Power enters recovery, does not assert.
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: Ic157d7e7041185a67f257f0f5710fd02e45cd77f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2357496
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/i2c_master.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/common/i2c_master.c b/common/i2c_master.c index 78a5e505b9..f078e690f7 100644 --- a/common/i2c_master.c +++ b/common/i2c_master.c @@ -242,10 +242,6 @@ void i2c_prepare_sysjump(void) { int i; - /* Must not call mutex_lock() before task_start(). */ - if (!task_start_called()) - return; - /* Lock all i2c controllers */ for (i = 0; i < ARRAY_SIZE(port_mutex); ++i) mutex_lock(port_mutex + i); |