From patchwork Fri Jul 8 22:52:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 957622 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p68Mr3Np025352 for ; Fri, 8 Jul 2011 22:53:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752339Ab1GHWxB (ORCPT ); Fri, 8 Jul 2011 18:53:01 -0400 Received: from na3sys009aog118.obsmtp.com ([74.125.149.244]:37899 "EHLO na3sys009aog118.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752299Ab1GHWxB (ORCPT ); Fri, 8 Jul 2011 18:53:01 -0400 Received: from mail-bw0-f47.google.com ([209.85.214.47]) (using TLSv1) by na3sys009aob118.postini.com ([74.125.148.12]) with SMTP ID DSNKTheKS8ij0U60GEGT8b2V4u/zwzFclw9n@postini.com; Fri, 08 Jul 2011 15:53:00 PDT Received: by mail-bw0-f47.google.com with SMTP id 20so2481865bwf.20 for ; Fri, 08 Jul 2011 15:52:59 -0700 (PDT) Received: by 10.204.33.70 with SMTP id g6mr1716477bkd.123.1310165579651; Fri, 08 Jul 2011 15:52:59 -0700 (PDT) Received: from localhost (cs181221225.pp.htv.fi [82.181.221.225]) by mx.google.com with ESMTPS id r24sm383218bkr.59.2011.07.08.15.52.57 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jul 2011 15:52:58 -0700 (PDT) From: Felipe Balbi To: Tony Lindgren Cc: Linux OMAP Mailing List , Felipe Balbi Subject: [PATCH 05/11] cbus: tahvo: drop the tasklet Date: Sat, 9 Jul 2011 01:52:33 +0300 Message-Id: <1310165559-31037-6-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1310165559-31037-1-git-send-email-balbi@ti.com> References: <1310165559-31037-1-git-send-email-balbi@ti.com> Organization: Texas Instruments\n Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 08 Jul 2011 22:53:04 +0000 (UTC) by moving to threaded IRQ. Signed-off-by: Felipe Balbi --- drivers/cbus/tahvo.c | 16 ++++------------ 1 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/cbus/tahvo.c b/drivers/cbus/tahvo.c index 0e28208..4b062de 100644 --- a/drivers/cbus/tahvo.c +++ b/drivers/cbus/tahvo.c @@ -43,7 +43,6 @@ static int tahvo_initialized; static int tahvo_is_betty; -static struct tasklet_struct tahvo_tasklet; static struct mutex tahvo_lock; static struct device *the_dev; @@ -174,12 +173,6 @@ EXPORT_SYMBOL(tahvo_set_backlight_level); static irqreturn_t tahvo_irq_handler(int irq, void *dev_id) { - tasklet_schedule(&tahvo_tasklet); - return IRQ_HANDLED; -} - -static void tahvo_tasklet_handler(unsigned long data) -{ struct tahvo_irq_handler_desc *hnd; u16 id; u16 im; @@ -212,6 +205,8 @@ static void tahvo_tasklet_handler(unsigned long data) */ } } + + return IRQ_HANDLED; } /* @@ -276,9 +271,6 @@ static int __devinit tahvo_probe(struct platform_device *pdev) mutex_init(&tahvo_lock); the_dev = &pdev->dev; - /* Prepare tasklet */ - tasklet_init(&tahvo_tasklet, tahvo_tasklet_handler, 0); - tahvo_initialized = 1; rev = tahvo_read_reg(TAHVO_REG_ASICR); @@ -308,7 +300,8 @@ static int __devinit tahvo_probe(struct platform_device *pdev) /* Mask all TAHVO interrupts */ tahvo_write_reg(TAHVO_REG_IMR, 0xffff); - ret = request_irq(irq, tahvo_irq_handler, IRQF_TRIGGER_RISING, + ret = request_threaded_irq(irq, NULL, tahvo_irq_handler, + IRQF_TRIGGER_RISING | IRQF_ONESHOT, "tahvo", 0); if (ret < 0) { dev_err(&pdev->dev, "Unable to register IRQ handler\n"); @@ -326,7 +319,6 @@ static int __devexit tahvo_remove(struct platform_device *pdev) /* Mask all TAHVO interrupts */ tahvo_write_reg(TAHVO_REG_IMR, 0xffff); free_irq(irq, 0); - tasklet_kill(&tahvo_tasklet); the_dev = NULL; return 0;