Commit 49e24c80 authored by Marek Behún's avatar Marek Behún Committed by Arnd Bergmann

firmware: turris-mox-rwtm: Initialize completion before mailbox

Initialize the completion before the mailbox channel is requested.

Fixes: 389711b3 ("firmware: Add Turris Mox rWTM firmware driver")
Signed-off-by: default avatarMarek Behún <kabel@kernel.org>
Reviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 8467cfe8
......@@ -499,6 +499,7 @@ static int turris_mox_rwtm_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, rwtm);
mutex_init(&rwtm->busy);
init_completion(&rwtm->cmd_done);
rwtm->mbox_client.dev = dev;
rwtm->mbox_client.rx_callback = mox_rwtm_rx_callback;
......@@ -512,8 +513,6 @@ static int turris_mox_rwtm_probe(struct platform_device *pdev)
goto remove_files;
}
init_completion(&rwtm->cmd_done);
ret = mox_get_board_info(rwtm);
if (ret < 0)
dev_warn(dev, "Cannot read board information: %i\n", ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment