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
738 struct gfar_private *priv = NULL;738 struct gfar_private *priv = NULL;
739 struct device_node *np = ofdev->dev.of_node;739 struct device_node *np = ofdev->dev.of_node;
740 struct device_node *child = NULL;740 struct device_node *child = NULL;
741 struct property *stash;
742 u32 stash_len = 0;741 u32 stash_len = 0;
743 u32 stash_idx = 0;742 u32 stash_idx = 0;
744 unsigned int num_tx_qs, num_rx_qs;743 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
854 goto err_grp_init;853 goto err_grp_init;
855 }854 }
856 855
857 stash = of_find_property(np, "bd-stash", NULL);856 if (of_property_read_bool(np, "bd-stash")) {
858
859 if (stash) {
860 priv->device_flags |= FSL_GIANFAR_DEV_HAS_BD_STASHING;857 priv->device_flags |= FSL_GIANFAR_DEV_HAS_BD_STASHING;
861 priv->bd_stash_en = 1;858 priv->bd_stash_en = 1;
862 }859 }

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