From patchwork Wed Apr 18 19:09:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 153567 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id EE7BAB6FA3 for ; Thu, 19 Apr 2012 05:09:40 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SKaFs-0000Ye-HA; Wed, 18 Apr 2012 19:09:28 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SKaFj-0000Y8-8g for kernel-team@lists.ubuntu.com; Wed, 18 Apr 2012 19:09:19 +0000 Received: from 5e0d6bec.bb.sky.com ([94.13.107.236] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SKaFj-0002Uo-2C for kernel-team@lists.ubuntu.com; Wed, 18 Apr 2012 19:09:19 +0000 From: Luis Henriques To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] ite-cir: postpone ISR registration Date: Wed, 18 Apr 2012 20:09:17 +0100 Message-Id: <1334776157-32083-2-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1334776157-32083-1-git-send-email-luis.henriques@canonical.com> References: <1334776157-32083-1-git-send-email-luis.henriques@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com BugLink: http://bugs.launchpad.net/bugs/972723 An early registration of an ISR was causing a crash to several users. The reason was that IRQs were being triggered before the driver initialisation was completed. This patch fixes this by moving the invocation to request_irq() to a later stage on the driver probe function. Signed-off-by: Luis Henriques --- drivers/media/rc/ite-cir.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index 682009d..98d8ccf 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c @@ -1521,10 +1521,6 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id dev_desc->io_region_size, ITE_DRIVER_NAME)) goto failure; - if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED, - ITE_DRIVER_NAME, (void *)itdev)) - goto failure; - /* set driver data into the pnp device */ pnp_set_drvdata(pdev, itdev); itdev->pdev = pdev; @@ -1600,6 +1596,10 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id rdev->driver_name = ITE_DRIVER_NAME; rdev->map_name = RC_MAP_RC6_MCE; + if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED, + ITE_DRIVER_NAME, (void *)itdev)) + goto failure; + ret = rc_register_device(rdev); if (ret) goto failure;