From: Mark Brown on
On Fri, Mar 12, 2010 at 07:16:36PM +0200, Ameya Palande wrote:

> @@ -1045,6 +1045,7 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
> regulator->dev_attr.attr.owner = THIS_MODULE;
> regulator->dev_attr.attr.mode = 0444;
> regulator->dev_attr.show = device_requested_uA_show;
> + sysfs_attr_init(&regulator->dev_attr.attr);
> err = device_create_file(dev, &regulator->dev_attr);
> if (err < 0) {
> printk(KERN_WARNING "%s: could not add regulator_dev"

Without having looked at what sysfs_attr_init() is actually doing it
looks odd to be calling an init() function after having initialised
several members of the structure - I'd expect to see the call happen
before we start writing stuff in?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Mark Brown on
On Fri, Mar 12, 2010 at 08:09:01PM +0200, Ameya Palande wrote:
> From: Ameya Palande <ameya.palande(a)nokia.com>
>
> WARNING: at kernel/lockdep.c:2706 sysfs_add_file_mode+0x4c/0xa8()
>
> Difference between v1 and v2:
> Moved sysfs_attr_init() call as first one to access the structure.
>
> Signed-off-by: Ameya Palande <ameya.palande(a)nokia.com>
> CC: Liam Girdwood <lrg(a)slimlogic.co.uk>
> CC: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
> CC: David Brownell <dbrownell(a)users.sourceforge.net>

Acked-by: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Liam Girdwood on
On Fri, 2010-03-12 at 20:09 +0200, Ameya Palande wrote:
> From: Ameya Palande <ameya.palande(a)nokia.com>
>
> WARNING: at kernel/lockdep.c:2706 sysfs_add_file_mode+0x4c/0xa8()
>
> Difference between v1 and v2:
> Moved sysfs_attr_init() call as first one to access the structure.
>
> Signed-off-by: Ameya Palande <ameya.palande(a)nokia.com>
> CC: Liam Girdwood <lrg(a)slimlogic.co.uk>
> CC: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
> CC: David Brownell <dbrownell(a)users.sourceforge.net>
> ---

Applied.

Thanks.

Liam

--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/