From patchwork Wed Feb 24 13:15:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laxman Dewangan X-Patchwork-Id: 8407561 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 60274C0553 for ; Wed, 24 Feb 2016 13:44:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B65C020303 for ; Wed, 24 Feb 2016 13:44:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 092612034C for ; Wed, 24 Feb 2016 13:44:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757700AbcBXNmB (ORCPT ); Wed, 24 Feb 2016 08:42:01 -0500 Received: from hqemgate15.nvidia.com ([216.228.121.64]:3307 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757517AbcBXNbw (ORCPT ); Wed, 24 Feb 2016 08:31:52 -0500 Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com id ; Wed, 24 Feb 2016 05:31:37 -0800 Received: from hqemhub03.nvidia.com ([172.20.12.94]) by hqnvupgp07.nvidia.com (PGP Universal service); Wed, 24 Feb 2016 05:30:47 -0800 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Wed, 24 Feb 2016 05:30:47 -0800 Received: from ldewanganubuntu-System-Product-Name.nvidia.com (172.20.144.16) by hqemhub03.nvidia.com (172.20.150.15) with Microsoft SMTP Server (TLS) id 8.3.406.0; Wed, 24 Feb 2016 05:31:40 -0800 From: Laxman Dewangan To: , , CC: , , , , , , , Laxman Dewangan , Laurent Pinchart , Geert Uytterhoeven , Subject: [PATCH 25/50] pinctrl: ish-pfc: Use devm_pinctrl_register() for pinctrl registration Date: Wed, 24 Feb 2016 18:45:50 +0530 Message-ID: <1456319775-3216-26-git-send-email-ldewangan@nvidia.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456319775-3216-1-git-send-email-ldewangan@nvidia.com> References: <1456319775-3216-1-git-send-email-ldewangan@nvidia.com> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use devm_pinctrl_register() for pin control registration. Signed-off-by: Laxman Dewangan Cc: Laurent Pinchart Cc: Geert Uytterhoeven Cc: linux-renesas-soc@vger.kernel.org --- drivers/pinctrl/sh-pfc/core.c | 1 - drivers/pinctrl/sh-pfc/core.h | 1 - drivers/pinctrl/sh-pfc/pinctrl.c | 12 +----------- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index 181ea98..4b28fbb 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c @@ -587,7 +587,6 @@ static int sh_pfc_remove(struct platform_device *pdev) #ifdef CONFIG_GPIO_SH_PFC sh_pfc_unregister_gpiochip(pfc); #endif - sh_pfc_unregister_pinctrl(pfc); return 0; } diff --git a/drivers/pinctrl/sh-pfc/core.h b/drivers/pinctrl/sh-pfc/core.h index 62f53b2..8272114 100644 --- a/drivers/pinctrl/sh-pfc/core.h +++ b/drivers/pinctrl/sh-pfc/core.h @@ -57,7 +57,6 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc); int sh_pfc_unregister_gpiochip(struct sh_pfc *pfc); int sh_pfc_register_pinctrl(struct sh_pfc *pfc); -int sh_pfc_unregister_pinctrl(struct sh_pfc *pfc); u32 sh_pfc_read_raw_reg(void __iomem *mapped_reg, unsigned int reg_width); void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned int reg_width, diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c index 87b0a59..f17b5fc 100644 --- a/drivers/pinctrl/sh-pfc/pinctrl.c +++ b/drivers/pinctrl/sh-pfc/pinctrl.c @@ -692,19 +692,9 @@ int sh_pfc_register_pinctrl(struct sh_pfc *pfc) pmx->pctl_desc.pins = pmx->pins; pmx->pctl_desc.npins = pfc->info->nr_pins; - pmx->pctl = pinctrl_register(&pmx->pctl_desc, pfc->dev, pmx); + pmx->pctl = devm_pinctrl_register(pfc->dev, &pmx->pctl_desc, pmx); if (IS_ERR(pmx->pctl)) return PTR_ERR(pmx->pctl); return 0; } - -int sh_pfc_unregister_pinctrl(struct sh_pfc *pfc) -{ - struct sh_pfc_pinctrl *pmx = pfc->pinctrl; - - pinctrl_unregister(pmx->pctl); - - pfc->pinctrl = NULL; - return 0; -}