History

gianfar: use of_property_read_bool()

use of_property_read_bool() for testing bool property

Saurabh Sengar committed 10 years ago

Commit 3f8c0f71 parent 5e091e71 file · +1 −4Browse files

Unified · Split

drivers/net/ethernet/freescale/gianfar.c+1−4
@@ -738,7 +738,6 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev) · 737 unmodified lines
738738 struct gfar_private *priv = NULL;
739739 struct device_node *np = ofdev->dev.of_node;
740740 struct device_node *child = NULL;
741− struct property *stash;
742741 u32 stash_len = 0;
743742 u32 stash_idx = 0;
744743 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) · 109 unmodified lines
854853 goto err_grp_init;
855854 }
856855
857− stash = of_find_property(np, "bd-stash", NULL);
858−
859− if (stash) {
856+ if (of_property_read_bool(np, "bd-stash")) {
860857 priv->device_flags |= FSL_GIANFAR_DEV_HAS_BD_STASHING;
861858 priv->bd_stash_en = 1;
862859 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t