Skip to content

Commit 2a61e7b

Browse files
robherringJassiBrar
authored andcommitted
mailbox: Use of_property_read_bool() for boolean properties
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent 76d4ada commit 2a61e7b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

drivers/mailbox/hi6220-mailbox.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,7 @@ static int hi6220_mbox_probe(struct platform_device *pdev)
325325
writel(~0x0, ACK_INT_CLR_REG(mbox->ipc));
326326

327327
/* use interrupt for tx's ack */
328-
if (of_find_property(node, "hi6220,mbox-tx-noirq", NULL))
329-
mbox->tx_irq_mode = false;
330-
else
331-
mbox->tx_irq_mode = true;
328+
mbox->tx_irq_mode = !of_property_read_bool(node, "hi6220,mbox-tx-noirq");
332329

333330
if (mbox->tx_irq_mode)
334331
mbox->controller.txdone_irq = true;

drivers/mailbox/omap-mailbox.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,7 @@ static int omap_mbox_probe(struct platform_device *pdev)
749749

750750
finfo->name = child->name;
751751

752-
if (of_find_property(child, "ti,mbox-send-noirq", NULL))
753-
finfo->send_no_irq = true;
752+
finfo->send_no_irq = of_property_read_bool(child, "ti,mbox-send-noirq");
754753

755754
if (finfo->tx_id >= num_fifos || finfo->rx_id >= num_fifos ||
756755
finfo->tx_usr >= num_users || finfo->rx_usr >= num_users)

0 commit comments

Comments
 (0)