From patchwork Sat Mar 4 16:23:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 9604153 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 4716260453 for ; Sat, 4 Mar 2017 16:49:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39FAB28464 for ; Sat, 4 Mar 2017 16:49:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E62F28477; Sat, 4 Mar 2017 16:49:08 +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 6EF0328464 for ; Sat, 4 Mar 2017 16:49:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752049AbdCDQtG (ORCPT ); Sat, 4 Mar 2017 11:49:06 -0500 Received: from mail-wr0-f179.google.com ([209.85.128.179]:35520 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752239AbdCDQtG (ORCPT ); Sat, 4 Mar 2017 11:49:06 -0500 Received: by mail-wr0-f179.google.com with SMTP id g10so91443598wrg.2 for ; Sat, 04 Mar 2017 08:48:42 -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=inr4fYF2Z/wlhFeHRmWTnjHvHT1uVq1xIzmGJm2gZes=; b=uwBy1rERpdBqNblb0Zi+D2H9LfWypatNI9UYvbdbStwka3vJKE/OeXRv+pHh0gdIIs /cgIx25x3DvDV7JDdQL7akPujkPmBE3BC7gGutiPjhm9/VurVveU0dNGg0yHHyV2NMPh ixaX1YY0ykOGXWNxVfjxfWryPnk3XW2SyY/jE+wWZlVAWIts/NX9eN+cmjrbhpUfPSTG +mfyB8ld8RT8P4BhOG1wPLJJo91ToI/2c1bj0AQSRXgVoQqyQk0cij/Pz40HZ8A8T10K rXaU++QzF1PpRH6OYmtHHdv604tQH3QFucgd4Lc/MfYw+cdTk37fjKJyfkCT19qCcoSy cVug== 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=inr4fYF2Z/wlhFeHRmWTnjHvHT1uVq1xIzmGJm2gZes=; b=VXh2J+kTPsqsR5xFzBYb5nCjM07xeO0CxoJIjvq1GlmuXcC9YnA6Zpdh9xALCnvupv S/QloVlpn2FKWUIcWEAQK96JYBsbApBNjFNid5aWYvDnuNEs7d0ntWkyDFzzK4DvB6Wy SmnqnIwRBm1JjyMvr9lw4TJLE7GsVmq5MS35InJJ+XhoICNoFXzyfD1VZ4ZB5uxSd8mR zZBrrYMdpcs56FLlvr0+bzrMPl/elypF2q9lbgrRfs0cGxV13C+cWpltQFRGTZG+SXJx ZuQVysvgM+hyb6x/eosNJl5rXr1oNMxsNVRbW8FWO4/K1FH+atF1C1SA4O5gyp2K9HNI vYMQ== X-Gm-Message-State: AMke39knrQn3L170fIcvK/0PqPBkMYXD1qukj8STM18IzPihqPc+1ZrWW3rLEXwYIn5GcyrY X-Received: by 10.223.132.166 with SMTP id 35mr7139574wrg.122.1488644651695; Sat, 04 Mar 2017 08:24:11 -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.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 04 Mar 2017 08:24:11 -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 08/12] gpio: davinci: use devm_irq_alloc_descs() Date: Sat, 4 Mar 2017 17:23:36 +0100 Message-Id: <1488644620-11488-9-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: Keerthy --- drivers/gpio/gpio-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 72f49d1..ac17357 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -483,7 +483,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev) clk_prepare_enable(clk); if (!pdata->gpio_unbanked) { - irq = irq_alloc_descs(-1, 0, ngpio, 0); + irq = devm_irq_alloc_descs(dev, -1, 0, ngpio, 0); if (irq < 0) { dev_err(dev, "Couldn't allocate IRQ numbers\n"); return irq;