Skip to content

Commit

Permalink
gianfar: use of_property_read_bool()
Browse files Browse the repository at this point in the history
use of_property_read_bool() for testing bool property

Signed-off-by: Saurabh Sengar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
saurabh-sengar authored and davem330 committed Nov 23, 2015
1 parent 5e091e7 commit 3f8c0f7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/ethernet/freescale/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 3f8c0f7

Please sign in to comment.