From patchwork Sat Mar 4 16:23:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 9604111 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 1881F602B4 for ; Sat, 4 Mar 2017 16:31:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C70B28478 for ; Sat, 4 Mar 2017 16:31:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0141728555; Sat, 4 Mar 2017 16:31:07 +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 7EC8E28478 for ; Sat, 4 Mar 2017 16:31:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752521AbdCDQbF (ORCPT ); Sat, 4 Mar 2017 11:31:05 -0500 Received: from mail-wr0-f179.google.com ([209.85.128.179]:35476 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501AbdCDQbC (ORCPT ); Sat, 4 Mar 2017 11:31:02 -0500 Received: by mail-wr0-f179.google.com with SMTP id g10so91287764wrg.2 for ; Sat, 04 Mar 2017 08:30:56 -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=1c+HirXednNBVnARLe5YJYdGjn9HGa8vyU7ArS5veOY=; b=b1EVR+TbGW7/qPRfTX7N29OOp5U5E8J1KqaKRYQpe/ECmABIebiUh91iszwYDN/820 63rSzRio7W/erSpAN9F7ZYtSFQnu9eaJhbq4W2+gtjVdQzHfKUtXuMIQL6XNRAnM/hVU j206GcpXBE7Ty4w+6Z8UehL+BlIIEaL/3CbPstr0B/WoqMEACwSy/Ixyrm7b9yjQMIPh gbwYF5ge4BxswJ6YTLKqXW81UqiFNFLE0TVGkknhIT3wpUX2TYZa3iKRlrPn60/oH2i5 eQf0YQwqXDGwKH4/dF95jx34YVD8jhXBvrNXPEiLzyb3YZ5wTFz/eu62XPVdCeI1K1ER HfzA== 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=1c+HirXednNBVnARLe5YJYdGjn9HGa8vyU7ArS5veOY=; b=Zq7uoIq2I1Mr1flQ4b5y4ur1ZwiRepVEeVmPhj4IE60XGKN3camL3nw3RanoP3Ji4v 1wd8BuTQ+EQt68pjkCStfSP2YbTswargmhuT4+BzGPav+Wp1izk/kyZyQu4N98ZV7Iz7 C9qvRBLglfbGYu5V8Wku3F7EqFJRkhv5LNwfqESeNoSKsZbxcV77Ipmc4f7oY694dhyx 0lofH7LeoCg9scWk2s+76DRql1qbpL7LLwRhd6srjWPATf2tSUPMx90T2u729PK0Qeyt K2ntphxYITb5iak4vJF/BudjFjp4P7ERHSDAp/D0yNyC8mgL9jfv5Dspq2ng8CTVOMAk i/2A== X-Gm-Message-State: AMke39nRka/NAYTt9sqMRAat+zK3RVFrwpVvApoLLmZU03UBLq35xXfkit8Ry5JcdY+Pr3AC X-Received: by 10.223.142.40 with SMTP id n37mr7018571wrb.137.1488644642812; Sat, 04 Mar 2017 08:24:02 -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.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 04 Mar 2017 08:24:02 -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 02/12] gpio: twl4030: use devm_irq_alloc_descs() Date: Sat, 4 Mar 2017 17:23:30 +0100 Message-Id: <1488644620-11488-3-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 irq descriptors it allocates. Fix it by using a resource managed variant of irq_alloc_descs(). Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpio-twl4030.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c index dfcfbba..24f388e 100644 --- a/drivers/gpio/gpio-twl4030.c +++ b/drivers/gpio/gpio-twl4030.c @@ -485,7 +485,8 @@ static int gpio_twl4030_probe(struct platform_device *pdev) goto no_irqs; } - irq_base = irq_alloc_descs(-1, 0, TWL4030_GPIO_MAX, 0); + irq_base = devm_irq_alloc_descs(&pdev->dev, -1, + 0, TWL4030_GPIO_MAX, 0); if (irq_base < 0) { dev_err(&pdev->dev, "Failed to alloc irq_descs\n"); return irq_base;