From patchwork Thu Dec 16 16:22:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12696511 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D066CC433F5 for ; Thu, 16 Dec 2021 16:38:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4b1oiHPrs+OB6uAdy0b4AhbgnllPG3Ob5ldBzIGoAoA=; b=P86N8HhtzszCyR hkX08qw1IX/KMWaaCq/OBBHumy3OaFxY8L9ueZITxk6FHZtC0a6GIsEpu7wY5jvzgBBNzSdG9fz5U eaSZseXOqgup/d2t9Nnx8vyHB4t12KoLUNfIDV/umARps+uC81GD0Q3zK5xhPd0ucLVLHkp4ZNaR7 qufAfuOYQyHtUSszvTxKdPsGGtNxUanFR+5SkL2b3qV7tAFsk2EAUkx/h16pmkhlgdWQ9melLpTTN VLYdNNruTdrDB5I+GVlvOI7fty9OminkfOybKSCCrpue94pXXpKO3g7k30OZBgkKhsjgoYZjfV5zv jIXEWGn4yQgcbsyBLoBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxtkV-006eri-Dx; Thu, 16 Dec 2021 16:36:56 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxtWO-006aHE-6Q for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 16:22:21 +0000 Received: by mail-lj1-x22d.google.com with SMTP id a37so38220903ljq.13 for ; Thu, 16 Dec 2021 08:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JUJgiOCeEkvWRBfsS4oHMEMSHGIv4GiMwDTH+LmBGxo=; b=IoU2buhjcjWp2q7dTYztQ+qpX9khq7w3X58Xw/LgcxE4PGjKWNNhJYajACUrAVTjAV 0pAehz9KDe0vabDtPwrPpT5+5cx+ekArogFvQRRudrAEWggcwLdZ9jDNqkfX2O7EeYVj VXLvZmB/auujRtxBKEHPiF6EEMSOYd/nEJJMPgB6kgGx2Q+TTohdHLGqTj/EK8/ACs5B qqm/a36vKUR5A3lsXy1FMwKyEZ0YhoCgw3aiidLX52s9PVy2Uy8rleHC+KwfQqeTYfc2 30yXUfz4MzD+gAr1XW3ghh9tEAPdLXsn7sJR5hhgn4lJYW4+eeg5AWWBs+W9MPVFrBT1 mCTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JUJgiOCeEkvWRBfsS4oHMEMSHGIv4GiMwDTH+LmBGxo=; b=JS0F5NFrkYungWcDpT6gXyYjIECv6zBvTH50NvbY8H80WQ4EQUn4ffhVvg4+54fRqp KlHcsDYvFPfXZ6tMTr58TYYcUetg6sVe5xekjVLaaScRqgoJyT5e+Bj0KiAmZxeUjDws KjW6Fxh8/fAiOSGvtwwCqghbk6/QG6ftY8nUWIGiAwMpIGgIgdbLH323JrtnwGIxwqC4 F/XRci/ykaUxtslaoc6d8Qn49vF2lx0rDGh7wUzsO0Lf6x6S5jjuIC5bJ8IkN+HCNZWP C96IbojUt8VUVAuNdJ8j0ZqZb36ZNDp/LCiOlQhR/MtpsMOJr191rOFrMHoRyVi3GxS7 9a/Q== X-Gm-Message-State: AOAM530Fp0+adK7q3bW6R5DNup3sAEPBlY+pFnVz/ThNcDVnBLQxHpOb OcjuSMGpH3hWXLh2Oojn6xA= X-Google-Smtp-Source: ABdhPJyrGXI7ioAaKnKKAK2OC5i6FS7Rxk9DNehos53wIcXBnCY1INj+5OTISTqtn/SLfMS9qHQipg== X-Received: by 2002:a2e:bd0e:: with SMTP id n14mr15323654ljq.159.1639671737725; Thu, 16 Dec 2021 08:22:17 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id s13sm938623lfg.126.2021.12.16.08.22.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 08:22:17 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Linus Walleij Cc: Dong Aisheng , Fabio Estevam , Shawn Guo , Stefan Agner , Pengutronix Kernel Team , Sascha Hauer , NXP Linux Team , Lakshmi Sowjanya D , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V2 4/4] pinctrl: add one more "const" for generic function groups Date: Thu, 16 Dec 2021 17:22:06 +0100 Message-Id: <20211216162206.8027-4-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211216162206.8027-1-zajec5@gmail.com> References: <20211216162206.8027-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_082220_310114_2E469174 X-CRM114-Status: GOOD ( 13.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki Generic code doesn't modify those strings and .get_function_groups callback has that extra "const" as well. This allows more flexibility in GENERIC_PINMUX_FUNCTIONS users. Signed-off-by: Rafał Miłecki --- drivers/pinctrl/pinmux.c | 2 +- drivers/pinctrl/pinmux.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index 6cdbd9ccf2f0..f94d43b082d9 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -875,7 +875,7 @@ EXPORT_SYMBOL_GPL(pinmux_generic_get_function); */ int pinmux_generic_add_function(struct pinctrl_dev *pctldev, const char *name, - const char **groups, + const char * const *groups, const unsigned int num_groups, void *data) { diff --git a/drivers/pinctrl/pinmux.h b/drivers/pinctrl/pinmux.h index 78c3a31be882..72fcf03eaa43 100644 --- a/drivers/pinctrl/pinmux.h +++ b/drivers/pinctrl/pinmux.h @@ -129,7 +129,7 @@ static inline void pinmux_init_device_debugfs(struct dentry *devroot, */ struct function_desc { const char *name; - const char **group_names; + const char * const *group_names; int num_group_names; void *data; }; @@ -150,7 +150,7 @@ struct function_desc *pinmux_generic_get_function(struct pinctrl_dev *pctldev, int pinmux_generic_add_function(struct pinctrl_dev *pctldev, const char *name, - const char **groups, + const char * const *groups, unsigned const num_groups, void *data);