Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4549618ybg; Mon, 8 Jun 2020 10:34:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOUpZhiYAeqVoiw6xJp+UB1No8LI9Oezqng3HzTWTpUhjjejcadCqX+1B6QE+zSwgyFIaI X-Received: by 2002:a17:906:5e06:: with SMTP id n6mr20950546eju.504.1591637688303; Mon, 08 Jun 2020 10:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591637688; cv=none; d=google.com; s=arc-20160816; b=VvcAw0RGkW+ntEyOWzj4LR5DamWnltS/iTHZ8dr4T3fX6PDBErnzROYL+cm5aV8QW3 PDBZQzpl9nNcmAI7HEYMpPgBNHDpimvZp2ltHt9b3Ab0qC88OyaEqq9Lhhu1prKaGC5D mslb/9V7hYnQS9bPV4VPwv1CCnkOfLTAiqrI0xvYI4p07zYVrlA7EFDLn0naZrzKKSb9 eQPKycgZ+aX1kzR/zWHyWtc4jS57hLrpTXdLzCivISLkn+tKjz+fFutO9giCoDgwA7BH fEJ+pq4AqRc/yKb0J4vb0sW3cNqaDK0ZTUhJwH70q0Fh/NDgrkAp/mpCpIWmIMTTcmjU qHLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=n3ZuE2opbTVwD8msOQk6XLQ46qcd8x5A17lQ9w6Zq0Q=; b=bG27ssY6llUgqhcsTt+9SETwlfD8liBsovS3e1Gew+uBQNRRnaGLzAC4mXPsUdpyGy DypaIs4Z2R/n/d2+lhKnTNGcqERKt6RCkYX04SGq/UB/d+cbNhEG1h4ZvXV9Xwgve7fq ETnMjOagEsVs/QRRjLbBW3BHBrCQvX7qJNiCXq7I8H4WhwonpeEy65sKjDvvSJIja6/S o2EMbvE4dbabLr/64ulo1iuJIb5h2bIbqFeM1+2fHybq2CG1lqDHQMfzAebe9/1U2wBh R4/e+OsGKHe4qDrbVHzjnxQLKXpLf/kBZdI6f2Gk4YFZx3zimQkyOmMSFc1AQvtM5f2X 5o3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si8768973eju.162.2020.06.08.10.34.25; Mon, 08 Jun 2020 10:34:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730178AbgFHOtB (ORCPT + 99 others); Mon, 8 Jun 2020 10:49:01 -0400 Received: from inva021.nxp.com ([92.121.34.21]:38508 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730101AbgFHOs0 (ORCPT ); Mon, 8 Jun 2020 10:48:26 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1936E200E5A; Mon, 8 Jun 2020 16:48:24 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 8DDA2200E57; Mon, 8 Jun 2020 16:48:19 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id AFEE1402FF; Mon, 8 Jun 2020 22:48:13 +0800 (SGT) From: Anson Huang To: aisheng.dong@nxp.com, festevam@gmail.com, shawnguo@kernel.org, stefan@agner.ch, kernel@pengutronix.de, linus.walleij@linaro.org, s.hauer@pengutronix.de, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Linux-imx@nxp.com Subject: [PATCH V2 4/9] pinctrl: imx8mn: Support building as module Date: Mon, 8 Jun 2020 22:37:31 +0800 Message-Id: <1591627056-19022-5-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591627056-19022-1-git-send-email-Anson.Huang@nxp.com> References: <1591627056-19022-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Support building i.MX8MN pinctrl driver as module. Signed-off-by: Anson Huang --- No changes. --- drivers/pinctrl/freescale/Kconfig | 2 +- drivers/pinctrl/freescale/pinctrl-imx8mn.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig index baa7e70..4bb6aeb 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -131,7 +131,7 @@ config PINCTRL_IMX8MM Say Y here to enable the imx8mm pinctrl driver config PINCTRL_IMX8MN - bool "IMX8MN pinctrl driver" + tristate "IMX8MN pinctrl driver" depends on ARCH_MXC select PINCTRL_IMX help diff --git a/drivers/pinctrl/freescale/pinctrl-imx8mn.c b/drivers/pinctrl/freescale/pinctrl-imx8mn.c index 100ed8c..b6db780 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx8mn.c +++ b/drivers/pinctrl/freescale/pinctrl-imx8mn.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -326,6 +327,7 @@ static const struct of_device_id imx8mn_pinctrl_of_match[] = { { .compatible = "fsl,imx8mn-iomuxc", .data = &imx8mn_pinctrl_info, }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, imx8mn_pinctrl_of_match); static int imx8mn_pinctrl_probe(struct platform_device *pdev) { @@ -340,9 +342,5 @@ static struct platform_driver imx8mn_pinctrl_driver = { }, .probe = imx8mn_pinctrl_probe, }; - -static int __init imx8mn_pinctrl_init(void) -{ - return platform_driver_register(&imx8mn_pinctrl_driver); -} -arch_initcall(imx8mn_pinctrl_init); +module_platform_driver(imx8mn_pinctrl_driver); +MODULE_LICENSE("GPL v2"); -- 2.7.4