From patchwork Mon May 23 09:02:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 68343 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1109866qge; Mon, 23 May 2016 02:03:02 -0700 (PDT) X-Received: by 10.66.123.37 with SMTP id lx5mr25747316pab.101.1463994182714; Mon, 23 May 2016 02:03:02 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6si2674224pav.242.2016.05.23.02.03.02; Mon, 23 May 2016 02:03:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 S1753335AbcEWJDB (ORCPT + 4 others); Mon, 23 May 2016 05:03:01 -0400 Received: from mail-lb0-f179.google.com ([209.85.217.179]:35006 "EHLO mail-lb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753303AbcEWJDA (ORCPT ); Mon, 23 May 2016 05:03:00 -0400 Received: by mail-lb0-f179.google.com with SMTP id ww9so53195390lbc.2 for ; Mon, 23 May 2016 02:02:59 -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=PZS/1dkM5LAggcimnow+nW1Kov+jRQDep2csAtDf68E=; b=YZ3gXp4vyv5aKOvaDpTWQ0J7JkLcZQcmHuG6/tnJcNPgNiKzg93cNWksFfa6FfGF02 THeHBJ7g3gTJkaz4Egu1E4AfXwrkxcFwCIJAjN8WzIAQzJobRG0oc6JcapoO0HXVAzfJ ohZtjePJ4WZ5Iyk62hVTdCGJw1FEZAHl4DNRU= 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=PZS/1dkM5LAggcimnow+nW1Kov+jRQDep2csAtDf68E=; b=MkNCFWdD3tv7SVzO1eZf6jdQ5RwKGgoekwPbXHbxhYu/93e2vnuSZZ9Mr5svY9lkm4 QT6KTPs8A64uDK6nt/8fWo0R9FV+YdB4OKkdsZmGQOzSZ5FFmn4pbREs0autX0slYYxs 17KYy5v2tlkVU5EWs7GNDZZPQ/A22YQL9pSiR9UHcwrio3avcvrUKKed8TlF8t1iZd0l 7XgDkk9eWc6y4+Th8ZQBUMt+8clahIged+R5nlK66D8k9xD3+K7YOo9VXxTzN63JVMJ9 //rXYxeTHBeRuf55/1t2aD+aI7pM2ve6QohmGVq82/xiEzV6JqUPUVZ4PMomhiPo3FZZ RgCA== X-Gm-Message-State: AOPr4FXWrQ+1vlKuOnSoID+AsC11ENzql39fYy99UF9CEnM/1SSQj1JVe7akG2Aa4fdUyPUo X-Received: by 10.112.10.71 with SMTP id g7mr5509104lbb.116.1463994178733; Mon, 23 May 2016 02:02:58 -0700 (PDT) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id b8sm1166603lbc.16.2016.05.23.02.02.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 May 2016 02:02:57 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org, Alexandre Courbot Cc: Linus Walleij , John Crispin , Pramod Gurav , Martin Schiller Subject: [PATCH] pinctrl: xway: use devm_gpiochip_add_data() Date: Mon, 23 May 2016 11:02:53 +0200 Message-Id: <1463994173-13599-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.11 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Avoid a gpiochip_free() and use standard functions. Cc: John Crispin Cc: Pramod Gurav Cc: Martin Schiller Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-xway.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.4.11 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" 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/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c index a13f2b6f6fc0..b9375544dff0 100644 --- a/drivers/pinctrl/pinctrl-xway.c +++ b/drivers/pinctrl/pinctrl-xway.c @@ -1724,9 +1724,9 @@ static int pinmux_xway_probe(struct platform_device *pdev) } xway_pctrl_desc.pins = xway_info.pads; - /* load the gpio chip */ + /* register the gpio chip */ xway_chip.parent = &pdev->dev; - ret = gpiochip_add(&xway_chip); + ret = devm_gpiochip_add_data(&pdev->dev, &xway_chip, NULL); if (ret) { dev_err(&pdev->dev, "Failed to register gpio chip\n"); return ret; @@ -1749,7 +1749,6 @@ static int pinmux_xway_probe(struct platform_device *pdev) /* register with the generic lantiq layer */ ret = ltq_pinctrl_register(pdev, &xway_info); if (ret) { - gpiochip_remove(&xway_chip); dev_err(&pdev->dev, "Failed to register pinctrl driver\n"); return ret; }