From patchwork Mon Jul 11 11:17:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 964022 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6BBICNi020340 for ; Mon, 11 Jul 2011 11:18:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754868Ab1GKLSL (ORCPT ); Mon, 11 Jul 2011 07:18:11 -0400 Received: from na3sys009aog114.obsmtp.com ([74.125.149.211]:51659 "EHLO na3sys009aog114.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754788Ab1GKLSK (ORCPT ); Mon, 11 Jul 2011 07:18:10 -0400 Received: from mail-yi0-f46.google.com ([209.85.218.46]) (using TLSv1) by na3sys009aob114.postini.com ([74.125.148.12]) with SMTP ID DSNKThrb8XB/DbJD99gJhAkseXGBmQAogQKf@postini.com; Mon, 11 Jul 2011 04:18:10 PDT Received: by mail-yi0-f46.google.com with SMTP id 27so1882406yia.33 for ; Mon, 11 Jul 2011 04:18:09 -0700 (PDT) Received: by 10.150.146.15 with SMTP id t15mr3569037ybd.144.1310383089350; Mon, 11 Jul 2011 04:18:09 -0700 (PDT) Received: from localhost (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id i9sm654312ybe.11.2011.07.11.04.18.07 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jul 2011 04:18:08 -0700 (PDT) From: Felipe Balbi To: Tony Lindgren Cc: Linux OMAP Mailing List , =?UTF-8?q?Michael=20B=C3=BCsch?= , Felipe Balbi Subject: [PATCH 05/22] cbus: tahvo: drop the tasklet Date: Mon, 11 Jul 2011 14:17:18 +0300 Message-Id: <1310383055-20211-6-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1310383055-20211-1-git-send-email-balbi@ti.com> References: <1310383055-20211-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 (demeter1.kernel.org [140.211.167.41]); Mon, 11 Jul 2011 11:18:13 +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;