diff options
author | Cristian Marussi <cristian.marussi@arm.com> | 2022-12-22 21:50:41 +0300 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2023-01-19 12:41:39 +0300 |
commit | 7a75b7afd8ff7b891e60b2fc9622148e6d1e010a (patch) | |
tree | 2bb701bff06a2df602df43313c565d8cb176b4f1 /drivers/firmware/arm_scmi/mailbox.c | |
parent | e325285de2cd82fbdcc4df8898e4c6a597674816 (diff) | |
download | linux-7a75b7afd8ff7b891e60b2fc9622148e6d1e010a.tar.xz |
firmware: arm_scmi: Simplify chan_available transport operation
SCMI transport operation .chan_available determines in a transport
specific way if an SCMI channel is still available and to be configured.
Such information is derived by analyzing bits of device node in a
transport specific way, all it needs is a device node to operate up on,
not necessarily a full blown device.
Simplify the helper to receive in input a reference to a device_node
instead of a device carrying a pointer to such device_node.
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20221222185049.737625-2-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware/arm_scmi/mailbox.c')
-rw-r--r-- | drivers/firmware/arm_scmi/mailbox.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/arm_scmi/mailbox.c b/drivers/firmware/arm_scmi/mailbox.c index 1e40cb035044..c33dcadafea8 100644 --- a/drivers/firmware/arm_scmi/mailbox.c +++ b/drivers/firmware/arm_scmi/mailbox.c @@ -46,9 +46,9 @@ static void rx_callback(struct mbox_client *cl, void *m) scmi_rx_callback(smbox->cinfo, shmem_read_header(smbox->shmem), NULL); } -static bool mailbox_chan_available(struct device *dev, int idx) +static bool mailbox_chan_available(struct device_node *of_node, int idx) { - return !of_parse_phandle_with_args(dev->of_node, "mboxes", + return !of_parse_phandle_with_args(of_node, "mboxes", "#mbox-cells", idx, NULL); } |