diff options
author | Marek BehĂșn <kabel@kernel.org> | 2024-07-15 13:59:12 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2024-07-15 16:57:57 +0200 |
commit | 49e24c80d3c81c43e2a56101449e1eea32fcf292 (patch) | |
tree | 76dd547bfe2c75bda2e56de24e45fd6985553053 /drivers/firmware | |
parent | firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_t... (diff) | |
download | linux-49e24c80d3c81c43e2a56101449e1eea32fcf292.tar.xz linux-49e24c80d3c81c43e2a56101449e1eea32fcf292.zip |
firmware: turris-mox-rwtm: Initialize completion before mailbox
Initialize the completion before the mailbox channel is requested.
Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver")
Signed-off-by: Marek BehĂșn <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/turris-mox-rwtm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris-mox-rwtm.c index 3f4758e03c81..3e7f186d239a 100644 --- a/drivers/firmware/turris-mox-rwtm.c +++ b/drivers/firmware/turris-mox-rwtm.c @@ -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); |