Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gianfar: use of_property_read_bool()

use of_property_read_bool() for testing bool property

Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Saurabh Sengar and committed by
David S. Miller
3f8c0f7e 5e091e7a

+1 -4
+1 -4
drivers/net/ethernet/freescale/gianfar.c
··· 738 738 struct gfar_private *priv = NULL; 739 739 struct device_node *np = ofdev->dev.of_node; 740 740 struct device_node *child = NULL; 741 - struct property *stash; 742 741 u32 stash_len = 0; 743 742 u32 stash_idx = 0; 744 743 unsigned int num_tx_qs, num_rx_qs; ··· 853 854 goto err_grp_init; 854 855 } 855 856 856 - stash = of_find_property(np, "bd-stash", NULL); 857 - 858 - if (stash) { 857 + if (of_property_read_bool(np, "bd-stash")) { 859 858 priv->device_flags |= FSL_GIANFAR_DEV_HAS_BD_STASHING; 860 859 priv->bd_stash_en = 1; 861 860 }