From patchwork Fri May 23 10:30:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 30685 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2E63F20369 for ; Fri, 23 May 2014 10:31:51 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id ma3sf17266353pbc.11 for ; Fri, 23 May 2014 03:31:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=fcIs53x+Hf+OaMFbQzS4XuAeuuqNoJ0Nclluk72aQzs=; b=F9MvDtG1lDKLPnxgdbkFQsEbQu5/yDhWpSf31WmP+bvbu5LCosTNOGFjA8wbjDuDN9 XpXK4s1Z7Gu9rufYDodOiEBcFXUz6yCXnsw+KuWvs4GTt392Fyjndr7X1+NyFoaKmr1S AHpnUeBgwAZnNX0gd5HIFwf9txul3Moe9loK9um1UXk2DrP1NkWLKdevx/O7XEqQbbNZ QsxSnEUzhkx4CyQt4935faaqoyWchmconANM35+Oc8TGiBoYDiktQxEymm3/q10NsQsX eVqQ4gn/HR2q0EXrYy7wmHVSxTcgGlHtXAS49XcFCkBBSJOTELM/0836Pv/MxuyzCIdp QSbg== X-Gm-Message-State: ALoCoQmzkXE/3ujUAL1pbz3+3a0yAXY44cguYhnMUTRlky6fWU42wI0k98IGjnHdydYcmZVydZiy X-Received: by 10.67.4.202 with SMTP id cg10mr1716123pad.42.1400841110259; Fri, 23 May 2014 03:31:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.82.231 with SMTP id h94ls1712638qgd.49.gmail; Fri, 23 May 2014 03:31:50 -0700 (PDT) X-Received: by 10.58.29.16 with SMTP id f16mr3434134veh.23.1400841110029; Fri, 23 May 2014 03:31:50 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id cl9si1369052vdd.81.2014.05.23.03.31.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:31:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jw12so5942077veb.6 for ; Fri, 23 May 2014 03:31:49 -0700 (PDT) X-Received: by 10.58.169.97 with SMTP id ad1mr34293vec.45.1400841109927; Fri, 23 May 2014 03:31:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp19710vcb; Fri, 23 May 2014 03:31:49 -0700 (PDT) X-Received: by 10.68.133.163 with SMTP id pd3mr4573641pbb.166.1400841109147; Fri, 23 May 2014 03:31:49 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pr9si3223610pbc.175.2014.05.23.03.31.48 for ; Fri, 23 May 2014 03:31:48 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752126AbaEWKbk (ORCPT + 27 others); Fri, 23 May 2014 06:31:40 -0400 Received: from mail-we0-f175.google.com ([74.125.82.175]:50944 "EHLO mail-we0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751231AbaEWKbi (ORCPT ); Fri, 23 May 2014 06:31:38 -0400 Received: by mail-we0-f175.google.com with SMTP id t61so4698710wes.34 for ; Fri, 23 May 2014 03:31:37 -0700 (PDT) X-Received: by 10.180.182.19 with SMTP id ea19mr2527180wic.14.1400841097526; Fri, 23 May 2014 03:31:37 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-404-187.w82-125.abo.wanadoo.fr. [82.125.3.187]) by mx.google.com with ESMTPSA id s9sm2200908wix.13.2014.05.23.03.31.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:31:36 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 01/71] clocksource: sh_cmt: Use request_irq() instead of setup_irq() Date: Fri, 23 May 2014 12:30:41 +0200 Message-Id: <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <537F214C.8000700@linaro.org> References: <537F214C.8000700@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Laurent Pinchart The driver claims it needs to register an interrupt handler too early for request_irq(). This might have been true in the past, but the only meaningful difference between request_irq() and setup_irq() today is an additional kzalloc() call in request_irq(). As the driver calls kmalloc() itself we know that the slab allocator is available, we can thus switch to request_irq(). Signed-off-by: Laurent Pinchart --- drivers/clocksource/sh_cmt.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 0b1836a..a3103b8 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c @@ -728,12 +728,6 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev) goto err1; } - /* request irq using setup_irq() (too early for request_irq()) */ - p->irqaction.name = dev_name(&p->pdev->dev); - p->irqaction.handler = sh_cmt_interrupt; - p->irqaction.dev_id = p; - p->irqaction.flags = IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING; - /* get hold of clock */ p->clk = clk_get(&p->pdev->dev, "cmt_fck"); if (IS_ERR(p->clk)) { @@ -786,7 +780,9 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev) } p->cs_enabled = false; - ret = setup_irq(irq, &p->irqaction); + ret = request_irq(irq, sh_cmt_interrupt, + IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING, + dev_name(&p->pdev->dev), p); if (ret) { dev_err(&p->pdev->dev, "failed to request irq %d\n", irq); goto err4;