[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150610144628.GB11618@earth>
Date: Wed, 10 Jun 2015 16:46:28 +0200
From: Sebastian Reichel <sre@...nel.org>
To: Krzysztof Kozlowski <k.kozlowski@...sung.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] power_supply: sysfs: Bring back write to writeable
properties
Hi,
On Mon, Jun 08, 2015 at 10:09:48AM +0900, Krzysztof Kozlowski wrote:
> The fix for NULL pointer exception related to calling uevent for not
> finished probe caused to set all writeable properties as non-writeable.
> This was caused by checking if property is writeable before the initial
> increase of power supply usage counter and in the same time using
> wrapper over property_is_writeable(). The wrapper returns ENODEV if the
> usage counter is still 0.
>
> The call trace looked like:
> device probe:
> power_supply_register()
> use_cnt = 0;
> device_add()
> create sysfs entries
> power_supply_attr_is_visible()
> power_supply_property_is_writeable()
> if (use_cnt == 0) return -ENODEV;
> use_cnt++;
>
> Replace the usage of wrapper with direct call to property_is_writeable()
> from driver. This should be safe call during device probe because
> implementations of this callback just return 0/1 for different
> properties and they do not access any of the driver's internal data.
Thanks, queued.
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists