From patchwork Sat Mar 4 16:23:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 9604165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EC56E60453 for ; Sat, 4 Mar 2017 17:27:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6A4128477 for ; Sat, 4 Mar 2017 17:27:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9F582848F; Sat, 4 Mar 2017 17:27:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2000A28477 for ; Sat, 4 Mar 2017 17:27:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752163AbdCDR1n (ORCPT ); Sat, 4 Mar 2017 12:27:43 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:37709 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751970AbdCDR1m (ORCPT ); Sat, 4 Mar 2017 12:27:42 -0500 Received: by mail-wm0-f42.google.com with SMTP id n11so36276292wma.0 for ; Sat, 04 Mar 2017 09:27:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MeYjFRAKLUvRPGLK40/i8SO4Z6yUGJsdO4Y7O7/iWgA=; b=CazngGjirQ2VY9g0jz5os7GQ7JcWBbPjgL9OlFebaGC89Y4Gm0AwqNmQ1bpuFKlYzS Xvm4oxe7kMLfy9xmZn/s0otoxbqWf6zN7B/uT/tgBo5nUxGbh08HH5M+7ogAOIZp4vH9 eifJUa86aUH1UVPyJICECMiGlgI9XnY4j7B+3FcoCiV3AgXKqvRlEckB4cmqQS19PT4E 82yWwoQWPAQLkQqYyfqmRUgMPmnTEYqbDV71HbL0D1VW/DFRvc7QNw6tZrQiCDmdndGK /SIPm1FJt36wqEio3FSimxNXc3XvEOPxRhcZjIbp3XnFg/G1pi9wqIvqD99pynJPeqWO M+Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MeYjFRAKLUvRPGLK40/i8SO4Z6yUGJsdO4Y7O7/iWgA=; b=NEFs989PwtSuDTA0Btif3oU6a5sJSQFWVYMxygMaQ7t6JBOTHP109RiuyCEDsDBMn4 WTyKH+opa/rhnXMwb4t5SiuBREn29NITtsIkeC07HIl4zv7xqIPiBfKvcqdg/Zjm5AFy GVBmxyr47x/jigBPdsiEO8SsV5Hdk2KkBcA2nolYcOn8+2dkHr+bzvE7J7p00MuHEJ4n XAD+cHRszzjV8D6gUnRjrt0/QQSzieDepAaPbpg/KpXJ4zWjzLfyanHsQs75L2wclZFV acmLj9IoKFlhh5bIFSy+hkhqROsW/AmQqaR74d0eDkgFoieyNbi7Lp94APem/I4A5Sl/ 4sIA== X-Gm-Message-State: AMke39mLzS6HVCgwz9meY3OP+ewz4D5Gd6hKKr3onio85C+uVDuxcdKhIMJNn9DAxNAwHIGo X-Received: by 10.28.125.212 with SMTP id y203mr7867067wmc.90.1488644650294; Sat, 04 Mar 2017 08:24:10 -0800 (PST) Received: from bgdev-debian.lan (jua06-1-82-242-157-225.fbx.proxad.net. [82.242.157.225]) by smtp.gmail.com with ESMTPSA id b17sm7545753wma.33.2017.03.04.08.24.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 04 Mar 2017 08:24:09 -0800 (PST) From: Bartosz Golaszewski To: Linus Walleij , Alexandre Courbot , Bamvor Jian Zhang , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Robert Jarzmik Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Gleixner , Marc Zyngier , Bartosz Golaszewski Subject: [PATCH 07/12] gpio: pxa: use devm_irq_alloc_descs() Date: Sat, 4 Mar 2017 17:23:35 +0100 Message-Id: <1488644620-11488-8-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1488644620-11488-1-git-send-email-bgolaszewski@baylibre.com> References: <1488644620-11488-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This driver never frees the interrupt descriptors it allocates. Fix it by using the resource managed version of irq_alloc_descs(). Signed-off-by: Bartosz Golaszewski Acked-by: Robert Jarzmik --- drivers/gpio/gpio-pxa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 76ac906..832f3e4 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -601,7 +601,7 @@ static int pxa_gpio_probe_dt(struct platform_device *pdev, nr_gpios = gpio_id->gpio_nums; pxa_last_gpio = nr_gpios - 1; - irq_base = irq_alloc_descs(-1, 0, nr_gpios, 0); + irq_base = devm_irq_alloc_descs(&pdev->dev, -1, 0, nr_gpios, 0); if (irq_base < 0) { dev_err(&pdev->dev, "Failed to allocate IRQ numbers\n"); return irq_base;