From patchwork Thu Aug 10 10:06:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 9893223 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 C5CE460384 for ; Thu, 10 Aug 2017 11:03:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6A0C28AE6 for ; Thu, 10 Aug 2017 11:03:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7C7D28AF2; Thu, 10 Aug 2017 11:03:49 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE 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 6E9D028AE9 for ; Thu, 10 Aug 2017 11:03:48 +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=zQdWXbpCxCn0mjgoBNps/8MO9W2cpdvmLszZwZ4Fsj0=; b=pzlTQm7geBHdDfs2MuK7BVKmI1 UX/3NN/PGf6IbUf+xVzKLE7zHjdDzZCy1YZlWv4dqJRkmKCXdASWxQp7tdMlkmrv/ovMFRK9oRq1R O+MoHMg4/Th6V07I8IN3iAnqJD8hRDKOfoIFV/PwVkUpcnkzK0teMPrnTnmx4bt0UjaMzh6gRmQ7o Ab2fzQlIb9jvvznf7x6ClHJRHtZv8dnBOIeo/1pcm1WZ2FC59YzjAi/ZLwdFPWtkq3163P+0+I+dI rnb6ClkOuQR9dXT+gKPQOTt/SwNTdddiqF0tKLvw5BTV44yanLk7zfiSWHKKhVTpKpvnhbWtGILL9 ZbHREWIA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dflFR-0002Tt-Mv; Thu, 10 Aug 2017 11:03:29 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dfklt-0005DA-VV for linux-arm-kernel@bombadil.infradead.org; Thu, 10 Aug 2017 10:32:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=y1+TcXqf/MQhCQJJ3afb4ZET775HxB21c4PZwdCc4Vo=; b=W26spe6OMg58LgWf0FrEhmvXN 3wTCSYcjnRyA75XdbWEOeydtiS+6qqJmZAJFbVM7FrZ/JP80NSudZ8jAINjDdifgtWd1pfYRgktn7 IrYzJmwY8z21f4HLqhryuD548W3Iktn5YPHZ7BGebQcUTIyRAzPeeLMYadEY+dMwuxw7Ael6uh1Z8 megLFTUmdNAqSxRpOENW+VgPaJYS0gHgM60iJcMW0s3fbdNEK/odTB/VbJjQBH6p4Mi8pEqJvqGp5 Kk8em7teQK9HrBRjOrsIGT1wHqwA2JthQ3ahxus0fNwMVYd/pkEikpqDCXUawQzFvKMcKqbGrD4Bd b9oVQPQNw==; Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dfklr-0003cF-3p for linux-arm-kernel@lists.infradead.org; Thu, 10 Aug 2017 10:32:56 +0000 X-IronPort-AV: E=Sophos;i="5.41,352,1498514400"; d="scan'208";a="234125769" Received: from palace.rsr.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 10 Aug 2017 12:32:05 +0200 From: Julia Lawall To: Patrice Chotard Subject: [PATCH 04/17] pinctrl: st: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Date: Thu, 10 Aug 2017 12:06:16 +0200 Message-Id: <1502359589-15970-5-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502359589-15970-1-git-send-email-Julia.Lawall@lip6.fr> References: <1502359589-15970-1-git-send-email-Julia.Lawall@lip6.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170810_113255_206014_C811B20F X-CRM114-Status: GOOD ( 12.22 ) 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: Linus Walleij , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, bhumirks@gmail.com, 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 These structures are only stored in fields of a pinctrl_desc structure (confops, pctlops, and pmxops) that are const. Make the structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Patrice Chotard --- drivers/pinctrl/pinctrl-st.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index 7ac8b1e..aed8006 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -861,7 +861,7 @@ static void st_pctl_dt_free_map(struct pinctrl_dev *pctldev, { } -static struct pinctrl_ops st_pctlops = { +static const struct pinctrl_ops st_pctlops = { .get_groups_count = st_pctl_get_groups_count, .get_group_pins = st_pctl_get_group_pins, .get_group_name = st_pctl_get_group_name, @@ -928,7 +928,7 @@ static int st_pmx_set_gpio_direction(struct pinctrl_dev *pctldev, return 0; } -static struct pinmux_ops st_pmxops = { +static const struct pinmux_ops st_pmxops = { .get_functions_count = st_pmx_get_funcs_count, .get_function_name = st_pmx_get_fname, .get_function_groups = st_pmx_get_groups, @@ -1025,7 +1025,7 @@ static void st_pinconf_dbg_show(struct pinctrl_dev *pctldev, ST_PINCONF_UNPACK_RT_DELAY(config)); } -static struct pinconf_ops st_confops = { +static const struct pinconf_ops st_confops = { .pin_config_get = st_pinconf_get, .pin_config_set = st_pinconf_set, .pin_config_dbg_show = st_pinconf_dbg_show,