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 /chip/npcx/flash.c | |
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 'chip/npcx/flash.c')
-rw-r--r-- | chip/npcx/flash.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/chip/npcx/flash.c b/chip/npcx/flash.c index b2b51d15df..7afb413c2c 100644 --- a/chip/npcx/flash.c +++ b/chip/npcx/flash.c @@ -726,10 +726,6 @@ int flash_pre_init(void) void flash_lock_mapped_storage(int lock) { - /* Must not call mutex_lock() before task_start(). */ - if (!task_start_called()) - return; - if (lock) mutex_lock(&flash_lock); else |