From: Johannes Berg <johannes@sipsolutions.net> Date: 2016-08-05 09:30:44
- if (of_get_property(pdev->dev.of_node,
- "little-endian", NULL))
+ if (of_property_read_bool(pdev->dev.of_node, "little-
endian"))
priv->is_little_endian = true;
else
priv->is_little_endian = false;
Perhaps, while changing this, that'd be better as
priv->is_little_endian = of_property_read_bool(...);
Obviously that would've worked before, but now it'd be even easier to
understand, it seems.
johannes
From: Julia Lawall <hidden> Date: 2016-08-05 09:47:51
On Fri, 5 Aug 2016, Johannes Berg wrote:
quoted
- if (of_get_property(pdev->dev.of_node,
- "little-endian", NULL))
+ if (of_property_read_bool(pdev->dev.of_node, "little-
endian"))
priv->is_little_endian = true;
else
priv->is_little_endian = false;
Perhaps, while changing this, that'd be better as
priv->is_little_endian = of_property_read_bool(...);
Obviously that would've worked before, but now it'd be even easier to
understand, it seems.
Thanks for the suggestion. Will send shortly.
julia
From: Julia Lawall <hidden> Date: 2016-08-05 10:08:44
On Fri, 5 Aug 2016, Johannes Berg wrote:
quoted
- if (of_get_property(pdev->dev.of_node,
- "little-endian", NULL))
+ if (of_property_read_bool(pdev->dev.of_node, "little-
endian"))
priv->is_little_endian = true;
else
priv->is_little_endian = false;
Perhaps, while changing this, that'd be better as
priv->is_little_endian = of_property_read_bool(...);
Obviously that would've worked before, but now it'd be even easier to
understand, it seems.
Can I do the same for:
if (of_property_read_bool(np, "phy-clk-valid"))
pdata->check_phy_clk_valid = 1;
else
pdata->check_phy_clk_valid = 0;
The type is not bool, but:
include/linux/fsl_devices.h: unsigned check_phy_clk_valid:1;
thanks,
julia
From: Julia Lawall <hidden> Date: 2016-08-05 10:14:29
On Fri, 5 Aug 2016, Johannes Berg wrote:
On Fri, 2016-08-05 at 12:08 +0200, Julia Lawall wrote:
quoted
Can I do the same for:
if (of_property_read_bool(np, "phy-clk-valid"))
pdata->check_phy_clk_valid = 1;
else
pdata->check_phy_clk_valid = 0;
The type is not bool, but:
include/linux/fsl_devices.h: unsigned check_phy_clk_valid:1;
The type doesn't even matter, does it? Any bool->int conversion should
result in 0/1.
From: Johannes Berg <johannes@sipsolutions.net> Date: 2016-08-05 10:31:17
On Fri, 2016-08-05 at 12:08 +0200, Julia Lawall wrote:
Can I do the same for:
if (of_property_read_bool(np, "phy-clk-valid"))
pdata->check_phy_clk_valid = 1;
else
pdata->check_phy_clk_valid = 0;
The type is not bool, but:
include/linux/fsl_devices.h: unsigned check_phy_clk_valid:1;
The type doesn't even matter, does it? Any bool->int conversion should
result in 0/1.
johannes