* [PATCH] gianfar: use of_property_read_bool()
@ 2015-11-20 17:53 Saurabh Sengar
2015-11-23 17:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Saurabh Sengar @ 2015-11-20 17:53 UTC (permalink / raw)
To: claudiu.manoil, netdev, linux-kernel; +Cc: Saurabh Sengar
use of_property_read_bool() for testing bool property
Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
---
drivers/net/ethernet/freescale/gianfar.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 3e6b9b4..ebeea5e 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -738,7 +738,6 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
struct gfar_private *priv = NULL;
struct device_node *np = ofdev->dev.of_node;
struct device_node *child = NULL;
- struct property *stash;
u32 stash_len = 0;
u32 stash_idx = 0;
unsigned int num_tx_qs, num_rx_qs;
@@ -854,9 +853,7 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
goto err_grp_init;
}
- stash = of_find_property(np, "bd-stash", NULL);
-
- if (stash) {
+ if (of_property_read_bool(np, "bd-stash")) {
priv->device_flags |= FSL_GIANFAR_DEV_HAS_BD_STASHING;
priv->bd_stash_en = 1;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gianfar: use of_property_read_bool()
2015-11-20 17:53 [PATCH] gianfar: use of_property_read_bool() Saurabh Sengar
@ 2015-11-23 17:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-11-23 17:15 UTC (permalink / raw)
To: saurabh.truth; +Cc: claudiu.manoil, netdev, linux-kernel
From: Saurabh Sengar <saurabh.truth@gmail.com>
Date: Fri, 20 Nov 2015 23:23:58 +0530
> use of_property_read_bool() for testing bool property
>
> Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-23 17:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-20 17:53 [PATCH] gianfar: use of_property_read_bool() Saurabh Sengar
2015-11-23 17:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).