From: "Marek Behún" <kabel@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>, soc@kernel.org, arm@kernel.org
Cc: "Marek Behún" <kabel@kernel.org>, "Andy Shevchenko" <andy@kernel.org>
Subject: [PATCH 3/3] firmware: turris-mox-rwtm: Initialize completion before mailbox
Date: Mon, 15 Jul 2024 13:59:12 +0200 [thread overview]
Message-ID: <20240715115912.9507-4-kabel@kernel.org> (raw)
In-Reply-To: <20240715115912.9507-1-kabel@kernel.org>
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>
---
drivers/firmware/turris-mox-rwtm.c | 3 +--
1 file changed, 1 insertion(+), 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);
--
2.44.2
next prev parent reply other threads:[~2024-07-15 11:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-15 11:59 [PATCH 0/3] Fixes for turris-mox-rwtm driver Marek Behún
2024-07-15 11:59 ` [PATCH 1/3] firmware: turris-mox-rwtm: Do not complete if there are no waiters Marek Behún
2024-07-15 11:59 ` [PATCH 2/3] firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_timeout() Marek Behún
2024-07-15 11:59 ` Marek Behún [this message]
2024-08-06 20:08 ` [PATCH 0/3] Fixes for turris-mox-rwtm driver patchwork-bot+linux-soc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240715115912.9507-4-kabel@kernel.org \
--to=kabel@kernel.org \
--cc=andy@kernel.org \
--cc=arm@kernel.org \
--cc=arnd@arndb.de \
--cc=soc@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.