[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131224033729.GA6542@earth.universe>
Date: Tue, 24 Dec 2013 04:37:30 +0100
From: Sebastian Reichel <sre@...ian.org>
To: Anton Vorontsov <anton@...msg.org>
Cc: David Woodhouse <dwmw2@...radead.org>,
Rob Herring <rob.herring@...xeda.com>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Stephen Warren <swarren@...dotorg.org>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Rob Landley <rob@...dley.net>, linux-kernel@...r.kernel.org,
linux-omap@...r.kernel.org, devicetree@...r.kernel.org,
Pali Rohár <pali.rohar@...il.com>,
freemangordon@....bg, aaro.koskinen@....fi, pavel@....cz
Subject: Re: [PATCH 1/3] power_supply: add power_supply_get_by_phandle
On Mon, Dec 23, 2013 at 06:20:36PM -0800, Anton Vorontsov wrote:
> On Sun, Nov 24, 2013 at 05:49:29PM +0100, Sebastian Reichel wrote:
> > Add method to get power supply by device tree phandle.
> >
> > Signed-off-by: Sebastian Reichel <sre@...ian.org>
> > ---
> > drivers/power/power_supply_core.c | 24 ++++++++++++++++++++++++
> > include/linux/power_supply.h | 2 ++
> > 2 files changed, 26 insertions(+)
> >
> > diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
> > index 08bce22..99e4b41 100644
> > --- a/drivers/power/power_supply_core.c
> > +++ b/drivers/power/power_supply_core.c
> > @@ -340,6 +340,30 @@ struct power_supply *power_supply_get_by_name(const char *name)
> ...
> > +
> > + dev = class_find_device(power_supply_class, NULL, power_supply_np,
> > + power_supply_match_device_node);
> > +
> > + of_node_put(power_supply_np);
> > +
> > + return dev ? dev_get_drvdata(dev) : NULL;
> > +}
> > +EXPORT_SYMBOL_GPL(power_supply_get_by_phandle);
>
> The code had no !CONFIG_OF protection so I had to make the following
> changes to this patch:
Right. Thanks for queuing.
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists