mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-28 16:54:57 -04:00
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>
This commit is contained in:
committed by
Jassi Brar
parent
ea9bdec20a
commit
9e9afcb436
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user