[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <515B4E32.8080006@wwwdotorg.org>
Date: Tue, 02 Apr 2013 15:31:30 -0600
From: Stephen Warren <swarren@...dotorg.org>
To: Rhyland Klein <rklein@...dia.com>
CC: Anton Vorontsov <cbou@...l.ru>,
Grant Likely <grant.likely@...retlab.ca>,
David Woodhouse <dwmw2@...radead.org>,
linux-kernel@...r.kernel.org, devicetree-discuss@...ts.ozlabs.org,
linux-tegra@...r.kernel.org
Subject: Re: [PATCH V2 2/3] power: power_supply: Add core support for supplied_from
On 04/01/2013 03:45 PM, Rhyland Klein wrote:
> This patch adds support for supplies to register a list of char *'s
> which represent the list of supplies which supply them. This is the
> opposite as the supplied_to list.
This patch resolves the concerns I had before, so,
Reviewed-by: Stephen Warren <swarren@...dia.com>
> diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
> +static bool __power_supply_is_supplied_by(struct power_supply *supplier,
> + struct power_supply *supply)
> +{
> + int i;
> +
> + if (!supply->supplied_from && !supplier->supplied_to)
> + return false;
Nit: that somewhat duplicates the if below, so perhaps could just be
removed?
> + /* Support both supplied_to and supplied_from modes */
> + if (supply->supplied_from) {
> + if (!supplier->name)
> + return false;
Likewise, I'm still not convinced these !name tests should be required.
However, there's no harm here I think, so it's fine.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists