Re: [PATCH 1/6] PM / OPP: reuse of_parse_phandle()

From: Stephen Boyd
Date: Tue Aug 11 2015 - 02:02:36 EST


On 08/10, Viresh Kumar wrote:
> We already have a better API to get the opp descriptor block's node from
> cpu-node. Lets reuse that instead of creating our own routines for the
> same stuff. That cleans the code a lot.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>

Reviewed-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>

> diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
> index 204c6c945168..1daaa1a418a2 100644
> --- a/drivers/base/power/opp.c
> +++ b/drivers/base/power/opp.c
> /*
> * TODO: Support for multiple OPP tables.
> *
> * There should be only ONE phandle present in "operating-points-v2"
> * property.
> */
> - if (prop->length != sizeof(__be32)) {
> - dev_err(dev, "%s: Invalid opp desc phandle\n", __func__);
> - return ERR_PTR(-EINVAL);
> - }

But we lost this check? Perhaps we can use
of_count_phandle_with_args() to make suer we only have one
phandle?

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/