Skip to content

Commit 82e46bf

Browse files
robherringnmenon
authored andcommitted
soc: ti: 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 of_property_read_bool(). Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1b1b863 commit 82e46bf

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

drivers/soc/ti/knav_dma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ static int dma_init(struct device_node *cloud, struct device_node *dma_node)
666666
dma->rx_priority = DMA_PRIO_DEFAULT;
667667
dma->tx_priority = DMA_PRIO_DEFAULT;
668668

669-
dma->enable_all = (of_get_property(node, "ti,enable-all", NULL) != NULL);
670-
dma->loopback = (of_get_property(node, "ti,loop-back", NULL) != NULL);
669+
dma->enable_all = of_property_read_bool(node, "ti,enable-all");
670+
dma->loopback = of_property_read_bool(node, "ti,loop-back");
671671

672672
ret = of_property_read_u32(node, "ti,rx-retry-timeout", &timeout);
673673
if (ret < 0) {

drivers/soc/ti/knav_qmss_acc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ int knav_init_acc_range(struct knav_device *kdev,
521521

522522
info->pdsp = pdsp;
523523
channels = range->num_queues;
524-
if (of_get_property(node, "multi-queue", NULL)) {
524+
if (of_property_read_bool(node, "multi-queue")) {
525525
range->flags |= RANGE_MULTI_QUEUE;
526526
channels = 1;
527527
if (range->queue_base & (32 - 1)) {

drivers/soc/ti/knav_qmss_queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ static int knav_setup_queue_range(struct knav_device *kdev,
12641264
if (range->num_irqs)
12651265
range->flags |= RANGE_HAS_IRQ;
12661266

1267-
if (of_get_property(node, "qalloc-by-id", NULL))
1267+
if (of_property_read_bool(node, "qalloc-by-id"))
12681268
range->flags |= RANGE_RESERVED;
12691269

12701270
if (of_property_present(node, "accumulator")) {

drivers/soc/ti/wkup_m3_ipc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
681681
dev_warn(dev, "Invalid VTT GPIO(%d) pin\n", temp);
682682
}
683683

684-
if (of_find_property(np, "ti,set-io-isolation", NULL))
684+
if (of_property_read_bool(np, "ti,set-io-isolation"))
685685
wkup_m3_set_io_isolation(m3_ipc);
686686

687687
ret = of_property_read_string(np, "firmware-name",

0 commit comments

Comments
 (0)