diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 08:47:10 -0600 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2023-04-18 11:50:56 -0500 |
commit | 2a61e7b7bd92f4745457c60c86d8bf045d185bda (patch) | |
tree | 8b4aaf75827b90874e8bf33ae1763d7b272d8db4 /drivers/mailbox/hi6220-mailbox.c | |
parent | 76d4adacd52e78bea2e393081f2a5766261d1e3a (diff) |
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 <robh@kernel.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox/hi6220-mailbox.c')
-rw-r--r-- | drivers/mailbox/hi6220-mailbox.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mailbox/hi6220-mailbox.c b/drivers/mailbox/hi6220-mailbox.c index fca61f5312d9..1c73c63598f5 100644 --- a/drivers/mailbox/hi6220-mailbox.c +++ b/drivers/mailbox/hi6220-mailbox.c @@ -325,10 +325,7 @@ static int hi6220_mbox_probe(struct platform_device *pdev) writel(~0x0, ACK_INT_CLR_REG(mbox->ipc)); /* use interrupt for tx's ack */ - if (of_find_property(node, "hi6220,mbox-tx-noirq", NULL)) - mbox->tx_irq_mode = false; - else - mbox->tx_irq_mode = true; + mbox->tx_irq_mode = !of_property_read_bool(node, "hi6220,mbox-tx-noirq"); if (mbox->tx_irq_mode) mbox->controller.txdone_irq = true; |