From patchwork Sat Jan 6 14:25:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10147847 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 7B203601BE for ; Sat, 6 Jan 2018 14:26:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B386284F9 for ; Sat, 6 Jan 2018 14:26:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D557289C4; Sat, 6 Jan 2018 14:26:56 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D5D0F284F9 for ; Sat, 6 Jan 2018 14:26:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=rPidALHeUnjbQ4eFLJEuOecSbkC1P65FClanEOMbHuE=; b=Lu21nxKw390kUBO4a1mYbTvbbW NTZJsLHYf5l+hpAcYczRI33rd4E7eBnJ8OfeBSdY1VXoZOL+gPgaEAsT7DvLSQiRyAiLYRAoWYoIv RiG94dPTod6xbnu8tBpfi9hH/0Ig1wcFpgabKe/cwNBavJVaMH1bcJSVeR/pUsEuOu92L9oQB38f/ iTUy2qLEpXCbkkCGe0tmkSfvRxjTY4Nl4QhbzMWAqigCLrH4Dexf1guRqZqeujU6rRKrYglhr+W7M t37ehFznhzYgKwD/WwlWCqQnFccVNrw839ObXeUlvfXkuutWZWO5NYxgQ6xL4cRjRSQcLiOhEAV3q 6G8jvwsQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eXpQx-0005ej-W7; Sat, 06 Jan 2018 14:26:52 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eXpQW-0005On-AR for linux-arm-kernel@lists.infradead.org; Sat, 06 Jan 2018 14:26:26 +0000 Received: from trochilidae.toradex.int (unknown [IPv6:2001:1620:c6e::127]) by mail.kmu-office.ch (Postfix) with ESMTPSA id D2DD25C3B9C; Sat, 6 Jan 2018 15:19:30 +0100 (CET) From: Stefan Agner To: linus.walleij@linaro.org, shawnguo@kernel.org, kernel@pengutronix.de Subject: [PATCH v2 2/5] pinctrl: imx7d: simplify imx7d_pinctrl_probe Date: Sat, 6 Jan 2018 15:25:50 +0100 Message-Id: <20180106142553.15322-3-stefan@agner.ch> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180106142553.15322-1-stefan@agner.ch> References: <20180106142553.15322-1-stefan@agner.ch> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1515248371; bh=6BQFxQiGFelKgIAlXxS/aj+TRRfTq1HZwG6YW9LMVkc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=GW28qeT4WHO4CtjIEePPy3l3wnihvr1K9tbAbVdwYwUoyyoibDnSe7HSx143FroA1nmp/MmIv2M11HiIfaKkkooKDn6l8mTwlFqqkMpeVaHhvdvoVi55dHVj0v8cgDgYrJ5U97xJWaa3KQualQ8c4ixGHJPZf1Q66XeieQR4Hfg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180106_062624_586814_24684ACF X-CRM114-Status: UNSURE ( 8.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aisheng.dong@nxp.com, mark.rutland@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Agner , robh+dt@kernel.org, fabio.estevam@nxp.com, Arvind Yadav , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Using of_device_get_match_data in imx7d_pinctrl_probe simplifies the function. Also get rid of the void pointer cast since imx_pinctrl_probe now accepts const struct imx_pinctrl_soc_info. Cc: Arvind Yadav Signed-off-by: Stefan Agner --- drivers/pinctrl/freescale/pinctrl-imx7d.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/freescale/pinctrl-imx7d.c b/drivers/pinctrl/freescale/pinctrl-imx7d.c index 754159ee7b1e..0b0a2f33b06a 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx7d.c +++ b/drivers/pinctrl/freescale/pinctrl-imx7d.c @@ -378,16 +378,12 @@ static const struct of_device_id imx7d_pinctrl_of_match[] = { static int imx7d_pinctrl_probe(struct platform_device *pdev) { - const struct of_device_id *match; - struct imx_pinctrl_soc_info *pinctrl_info; + const struct imx_pinctrl_soc_info *pinctrl_info; - match = of_match_device(imx7d_pinctrl_of_match, &pdev->dev); - - if (!match) + pinctrl_info = of_device_get_match_data(&pdev->dev); + if (!pinctrl_info) return -ENODEV; - pinctrl_info = (struct imx_pinctrl_soc_info *) match->data; - return imx_pinctrl_probe(pdev, pinctrl_info); }