Re: [PATCH 08/11] net/fsl: use of_property_read_bool

From: Julia Lawall
Date: Fri Aug 05 2016 - 06:08:47 EST




On Fri, 5 Aug 2016, Johannes Berg wrote:

>
> > - 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