mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Ameya Palande <ameya.palande@nokia.com>
Cc: linux-kernel@vger.kernel.org, lrg@slimlogic.co.uk,
	dbrownell@users.sourceforge.net
Subject: Re: [PATCH] regulator: Get rid of lockdep warning
Date: Fri, 12 Mar 2010 17:21:56 +0000	[thread overview]
Message-ID: <20100312172156.GB22822@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <37adb5f9cc7986b51b7b560cf7644ac5177a6e34.1268411141.git.ameya.palande@nokia.com>

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?

  reply	other threads:[~2010-03-12 17:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12 17:16 Ameya Palande
2010-03-12 17:21 ` Mark Brown [this message]
2010-03-12 18:09   ` [PATCHv2] " Ameya Palande
2010-03-14 20:09     ` Mark Brown
2010-03-17 23:06     ` Liam Girdwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100312172156.GB22822@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=ameya.palande@nokia.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®