From: Takashi Iwai Subject: Re: [PATCH] fm801: move to pcim_* and devm_* functions Date: Tue, 20 Jan 2015 14:48:02 +0100 Message-ID: References: <1420587617-28521-1-git-send-email-andy.shevchenko@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 8A40C2604D0 for ; Tue, 20 Jan 2015 14:48:02 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Andy Shevchenko Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 20 Jan 2015 15:46:13 +0200, Andy Shevchenko wrote: > > On Tue, Jan 20, 2015 at 2:42 PM, Takashi Iwai wrote: > > At Wed, 07 Jan 2015 15:59:35 +0100, > > Takashi Iwai wrote: > > [] > > > > I recalled finally why I didn't want this sort of changes. Namely, > > devm_request_irq() can't be used safely for the shared PCI > > interrupts. > > > > There is a small open window between the driver's remove call > > (i.e. card's private_free or device free calls) and the call of > > devres_release_all(). The registered irq handler still remains during > > this window. When an irq is triggered from another shared device > > during this, it goes to the remaining irq handler and accesses the > > hardware unexpectedly. In the case of snd_fm801_interrupt(), it's not > > too bad, though. > > Don't we have interrupts disabled on ->remove() stage? It's a shared irq, so it doesn't help even if your device disables the irq. The other device can trigger the irq line at any time. Takashi