Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 49e24c8

Browse files
elkabloarndb
authored andcommitted
firmware: turris-mox-rwtm: Initialize completion before mailbox
Initialize the completion before the mailbox channel is requested. Fixes: 389711b ("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>
1 parent 8467cfe commit 49e24c8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/firmware/turris-mox-rwtm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ static int turris_mox_rwtm_probe(struct platform_device *pdev)
499499
platform_set_drvdata(pdev, rwtm);
500500

501501
mutex_init(&rwtm->busy);
502+
init_completion(&rwtm->cmd_done);
502503

503504
rwtm->mbox_client.dev = dev;
504505
rwtm->mbox_client.rx_callback = mox_rwtm_rx_callback;
@@ -512,8 +513,6 @@ static int turris_mox_rwtm_probe(struct platform_device *pdev)
512513
goto remove_files;
513514
}
514515

515-
init_completion(&rwtm->cmd_done);
516-
517516
ret = mox_get_board_info(rwtm);
518517
if (ret < 0)
519518
dev_warn(dev, "Cannot read board information: %i\n", ret);

0 commit comments

Comments
 (0)