[PATCH 1/5] firmware: arm_scmi: always initialize protocols

From: Etienne Carriere
Date: Thu Oct 08 2020 - 10:38:46 EST


Remove the IDR replacement that prevent initializing an SCMI protocol
when it has already been initialized. This is needed when there are
several SCMI agents that do implement a given SCMI protocol unless
what only the related SCMI protocol communication is initialized only
for first probed agent.

Signed-off-by: Etienne Carriere <etienne.carriere@xxxxxxxxxx>
---
drivers/firmware/arm_scmi/bus.c | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
index 1377ec76a45d..8ea04b069129 100644
--- a/drivers/firmware/arm_scmi/bus.c
+++ b/drivers/firmware/arm_scmi/bus.c
@@ -60,11 +60,6 @@ static int scmi_protocol_init(int protocol_id, struct scmi_handle *handle)
return fn(handle);
}

-static int scmi_protocol_dummy_init(struct scmi_handle *handle)
-{
- return 0;
-}
-
static int scmi_dev_probe(struct device *dev)
{
struct scmi_driver *scmi_drv = to_scmi_driver(dev->driver);
@@ -83,10 +78,6 @@ static int scmi_dev_probe(struct device *dev)
if (ret)
return ret;

- /* Skip protocol initialisation for additional devices */
- idr_replace(&scmi_protocols, &scmi_protocol_dummy_init,
- scmi_dev->protocol_id);
-
return scmi_drv->probe(scmi_dev);
}

--
2.17.1