firmware: scmi: use multi channel in mailbox, optee and smccc agents
Updates .process_msg operators of the SCMI transport drivers that
supports multi-channel to use it now that drivers do provide
the reference through channel argument. These are the mailbox
agent, the optee agent and the smccc agent.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c
index e63b67c..3efdab9 100644
--- a/drivers/firmware/scmi/mailbox_agent.c
+++ b/drivers/firmware/scmi/mailbox_agent.c
@@ -43,13 +43,9 @@
struct scmi_channel *channel,
struct scmi_msg *msg)
{
- struct scmi_mbox_channel *chan = dev_get_plat(dev);
+ struct scmi_mbox_channel *chan = &channel->ref;
int ret;
- /* Support SCMI drivers upgraded to of_get_channel operator */
- if (channel)
- chan = &channel->ref;
-
ret = scmi_write_msg_to_smt(dev, &chan->smt, msg);
if (ret)
return ret;