public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org, Yong Shen <yong.shen@linaro.org>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] regulator: Remove mc13xxx_unlock in regulator_register failure path
Date: Tue, 3 May 2011 16:21:40 +0100	[thread overview]
Message-ID: <20110503152139.GU1762@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1304435704.2591.18.camel@phoenix>

On Tue, May 03, 2011 at 11:15:04PM +0800, Axel Lin wrote:
> We do not hold the mutex_lock of struct mc13xxx while calling regulator_register,
> Thus remove mc13xxx_unlock in regulator_register failure path.

This feels painful, we shouldn't have to be faffing about with the lock
like this for basic I/O operations.  It feels like we should be pushing
the lock down into the register access functions - looking at the driver
I can't really see any reason why all this stuff is being done by hand,
especially when we've got explicit read/modify/write bitmask operations.

  reply	other threads:[~2011-05-03 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 15:15 [PATCH] regulator: Remove mc13xxx_unlock in regulator_register failure path Axel Lin
2011-05-03 15:21 ` Mark Brown [this message]
2011-05-03 16:25   ` Axel Lin

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=20110503152139.GU1762@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=axel.lin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=yong.shen@linaro.org \
    /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