From patchwork Mon Aug 8 08:03:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 73407 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp3088624qga; Mon, 8 Aug 2016 01:03:25 -0700 (PDT) X-Received: by 10.66.76.132 with SMTP id k4mr159012860paw.22.1470643405550; Mon, 08 Aug 2016 01:03:25 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si35727552pfk.77.2016.08.08.01.03.25; Mon, 08 Aug 2016 01:03:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751320AbcHHIDY (ORCPT + 4 others); Mon, 8 Aug 2016 04:03:24 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:38273 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbcHHIDX (ORCPT ); Mon, 8 Aug 2016 04:03:23 -0400 Received: by mail-wm0-f52.google.com with SMTP id o80so120848518wme.1 for ; Mon, 08 Aug 2016 01:03:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=iI6rk6QGM23l0GW0quCu5GXB8891v6VHm21xF9ZceZA=; b=kRN4C9gVGK6BmS9C0Qh6WH8v7SOOrM8yCi3wW7msdP6o7NNyATvkQMWwUzRP4xXwsh rfQY17EBYskdkulLY+Ak9aDQgNHqQln/CvaKhltrO6oRgF17GGSGpOd9WaFfu+Z350W/ hgA3GljeUlD+eEFiAvGqdmyL9G6VLMK54MgEM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iI6rk6QGM23l0GW0quCu5GXB8891v6VHm21xF9ZceZA=; b=B2JDbbLbNP2sQ7ksith3zjXdoIHSVt4hqHSBbT9LYE0zmA8AFDFvtC61jmOam0xUGV 1dn+Knr2ANJl4jBny3supF+pf5xIeJ3ear8jEylAGp1LLYEqpwJoYnE6dUnxjw9wFKMl Gcd9cCiwyHVrbtOdv/kUXySxHFs4vw+ilmkMcO+5AWz5NjRnOKySh5ROxmvjwcxbi0pG Z/T0lXMK/7uv77M5I3rgtbPCdH55tXrHgZ3VdRNqsSuC3GsvBuTvhPUqtt0YcGsapWoN MAeK2sfrXLyH+NKCWwgMyr5hpZ6t3HN28Lb1AD1eaTIjH0BvRoxmjklw80dm9pCQS7d4 cj2g== X-Gm-Message-State: AEkoouvRNIJE9MCgkbi7X9D51eL2IoW0f3GvA2ftGkB98J4KYXykSd827dMZu8PBh396yfDx X-Received: by 10.25.131.141 with SMTP id f135mr22915552lfd.217.1470643401558; Mon, 08 Aug 2016 01:03:21 -0700 (PDT) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id e65sm5415644lji.32.2016.08.08.01.03.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Aug 2016 01:03:20 -0700 (PDT) From: Linus Walleij To: Roger Quadros , Tony Lindgren Cc: linux-omap@vger.kernel.org, Linus Walleij Subject: [PATCH] memory: omap-gpmc: use devm_gpiochip_add_data() Date: Mon, 8 Aug 2016 10:03:16 +0200 Message-Id: <1470643396-6795-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This saves a few codelines in the driver. Cc: Roger Quadros Cc: Tony Lindgren Signed-off-by: Linus Walleij --- drivers/memory/omap-gpmc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index 869c83fb3c5d..b2aea23ca0ae 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2266,7 +2266,7 @@ static int gpmc_gpio_init(struct gpmc_device *gpmc) gpmc->gpio_chip.get = gpmc_gpio_get; gpmc->gpio_chip.base = -1; - ret = gpiochip_add(&gpmc->gpio_chip); + ret = devm_gpiochip_add_data(gpmv->dev, &gpmc->gpio_chip, NULL); if (ret < 0) { dev_err(gpmc->dev, "could not register gpio chip: %d\n", ret); return ret; @@ -2275,11 +2275,6 @@ static int gpmc_gpio_init(struct gpmc_device *gpmc) return 0; } -static void gpmc_gpio_exit(struct gpmc_device *gpmc) -{ - gpiochip_remove(&gpmc->gpio_chip); -} - static int gpmc_probe(struct platform_device *pdev) { int rc; @@ -2394,7 +2389,6 @@ static int gpmc_remove(struct platform_device *pdev) struct gpmc_device *gpmc = platform_get_drvdata(pdev); gpmc_free_irq(gpmc); - gpmc_gpio_exit(gpmc); gpmc_mem_exit(); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev);