firmware: scmi: fix the multi channel support with CCF
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Fri, 30 Sep 2022 07:36:38 +0000 (09:36 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 12 Oct 2022 12:55:31 +0000 (08:55 -0400)
commiteebb967dce04426b5f4b5f4fda51fbf95dea4c32
tree205785156234277f4a69f3bcdd5c54ce273549bd
parent6de1daf64b1acc3d2249ceed34756435a1b13d98
firmware: scmi: fix the multi channel support with CCF

When the CCF is activated, the dev->parent is not necessary
the reference to SCMI transport and the function devm_scmi_of_get_channel
failed for the registered SCMI clock, child for protocol@14,
the channel is null and the SCMI clock driver crash for any operations.

This patch changes the first parameter of the ops of_get_channel(),
aligned with other process_msg() to pass directly the good reference,
i.e. parent result of find_scmi_transport_device(dev)
which return the reference of the scmi transport device.

Fixes: 8e96801aa6a ("firmware: scmi: add multi-channel support")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
drivers/firmware/scmi/mailbox_agent.c
drivers/firmware/scmi/optee_agent.c
drivers/firmware/scmi/scmi_agent-uclass.c
drivers/firmware/scmi/smccc_agent.c