linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: "grant.likely@secretlab.ca" <grant.likely@secretlab.ca>,
	"linus.walleij@stericsson.com" <linus.walleij@stericsson.com>,
	"sameo@linux.intel.com" <sameo@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH V2 1/6] mfd: tps6586x:use devm managed resources
Date: Tue, 17 Jul 2012 17:53:46 +0100	[thread overview]
Message-ID: <20120717165346.GH4477@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <5004ED3F.4080601@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

On Tue, Jul 17, 2012 at 10:12:39AM +0530, Laxman Dewangan wrote:
> On Tuesday 17 July 2012 01:31 AM, Mark Brown wrote:
> >On Mon, Jul 16, 2012 at 12:21:45PM +0530, Laxman Dewangan wrote:

> >>-	ret = request_threaded_irq(irq, NULL, tps6586x_irq, IRQF_ONESHOT,
> >>-				   "tps6586x", tps6586x);
> >>+	ret = devm_request_threaded_irq(tps6586x->dev, irq, NULL, tps6586x_irq,
> >>+			IRQF_ONESHOT, "tps6586x", tps6586x);

> >Are you sure this is safe - what guarantees that we can't get an
> >interrupt while tearing the device down?

> I think device_remove will get called before the managed resource
> get freed.
> So do we need to call disable_irq() in remove() to avoid any interrupts?

That would be very rude if the IRQ happened to get shared, though that's
not possible at the moment.  In general it's pretty hard to use devm_
IRQs safely, it's normally safest to avoid them due to the issues with
ensuring that the interrupt handler is safe to be called even while the
device is being torn down.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-07-17 16:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-16  6:51 [PATCH V2 0/6] mfd: tp6586x: enhancements in the driver Laxman Dewangan
2012-07-16  6:51 ` [PATCH V2 1/6] mfd: tps6586x:use devm managed resources Laxman Dewangan
2012-07-16 20:01   ` Mark Brown
2012-07-17  4:42     ` Laxman Dewangan
2012-07-17 16:53       ` Mark Brown [this message]
2012-07-18  5:33         ` Laxman Dewangan
2012-07-16  6:51 ` [PATCH V2 2/6] mfd: Use regmap for tps6586x register access Laxman Dewangan
2012-07-16 20:02   ` Mark Brown
2012-07-16  6:51 ` [PATCH V2 3/6] mfd: tps6586x: cache register through regmap Laxman Dewangan
2012-07-16 20:03   ` Mark Brown
2012-07-17  4:28     ` Laxman Dewangan
2012-07-16  6:51 ` [PATCH V2 4/6] gpio: tps6586x: add gpio support through platform driver Laxman Dewangan
2012-07-16  6:51 ` [PATCH V2 5/6] ARM: tegra: defconfig: enable tps6586x gpio Laxman Dewangan
2012-07-16 22:35   ` Linus Walleij
2012-07-16  6:51 ` [PATCH V2 6/6] mfd: tps6586x: remove gpio support from core driver Laxman Dewangan
2012-07-16 22:35   ` Linus Walleij

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=20120717165346.GH4477@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=ldewangan@nvidia.com \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=swarren@nvidia.com \
    /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;
as well as URLs for NNTP newsgroup(s).