summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>2026-07-29 13:53:06 +0900
committerJassi Brar <jassisinghbrar@gmail.com>2026-08-15 15:41:12 -0500
commit9e9afcb436cec4f5331f2f4582595dffee72bed0 (patch)
tree2062a0697be7aa14ab320ca72122537854fb2f4f /drivers
parentea9bdec20aa511fa064e230a768880d7b56e1786 (diff)
downloadlinux-9e9afcb436cec4f5331f2f4582595dffee72bed0.tar.gz
linux-9e9afcb436cec4f5331f2f4582595dffee72bed0.zip
mailbox: arm_mhuv2: Use generic firmware property APIs
The protocol parsing code only requires reading firmware properties and does not depend on OF-specific interfaces. Replace OF property helpers with the generic device property API. Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mailbox/arm_mhuv2.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mailbox/arm_mhuv2.c b/drivers/mailbox/arm_mhuv2.c
index 14071398280b..ff3b1c7f72c3 100644
--- a/drivers/mailbox/arm_mhuv2.c
+++ b/drivers/mailbox/arm_mhuv2.c
@@ -931,11 +931,10 @@ static int mhuv2_allocate_channels(struct mhuv2 *mhu)
static int mhuv2_parse_channels(struct mhuv2 *mhu)
{
struct device *dev = mhu->mbox.dev;
- const struct device_node *np = dev->of_node;
int ret, count;
u32 *protocols;
- count = of_property_count_u32_elems(np, MHUV2_PROTOCOL_PROP);
+ count = device_property_count_u32(dev, MHUV2_PROTOCOL_PROP);
if (count <= 0 || count % 2) {
dev_err(dev, "Invalid %s property (%d)\n", MHUV2_PROTOCOL_PROP,
count);
@@ -946,7 +945,7 @@ static int mhuv2_parse_channels(struct mhuv2 *mhu)
if (!protocols)
return -ENOMEM;
- ret = of_property_read_u32_array(np, MHUV2_PROTOCOL_PROP, protocols, count);
+ ret = device_property_read_u32_array(dev, MHUV2_PROTOCOL_PROP, protocols, count);
if (ret) {
dev_err(dev, "Failed to read %s property: %d\n",
MHUV2_PROTOCOL_PROP, ret);