From patchwork Mon Jan 5 09:01:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5565671 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 808AE9F4DC for ; Mon, 5 Jan 2015 09:05:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A8C382015A for ; Mon, 5 Jan 2015 09:05:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD1B6200E3 for ; Mon, 5 Jan 2015 09:05:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753227AbbAEJCB (ORCPT ); Mon, 5 Jan 2015 04:02:01 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:32293 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753505AbbAEJBq (ORCPT ); Mon, 5 Jan 2015 04:01:46 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NHP00E5C59OF760@mailout3.w1.samsung.com>; Mon, 05 Jan 2015 09:05:48 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-60-54aa52f8156d Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id EB.DB.07834.8F25AA45; Mon, 05 Jan 2015 09:01:44 +0000 (GMT) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NHP00IBC52PMQ00@eusync4.samsung.com>; Mon, 05 Jan 2015 09:01:44 +0000 (GMT) From: Krzysztof Kozlowski To: Samuel Ortiz , Lee Jones , linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Tony Lindgren , linux-omap@vger.kernel.org Subject: [PATCH 13/14] mfd: twl-core: Constify struct regmap_config and reg_default array Date: Mon, 05 Jan 2015 10:01:32 +0100 Message-id: <1420448493-9355-13-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1420448493-9355-1-git-send-email-k.kozlowski@samsung.com> References: <1420448493-9355-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJJMWRmVeSWpSXmKPExsVy+t/xa7o/glaFGGz+wm/x+oWhxf2vRxkt Lu+aw2Yxe0k/i8XpblaL/Ve8HNg8vn2dxOJx59oeNo95JwM9+rasYvT4vEkugDWKyyYlNSez LLVI3y6BK2NO/0H2gib+im27ljA2MK7l6WLk5JAQMJHYP+kBE4QtJnHh3nq2LkYuDiGBpYwS G1e0MkE4fUwSM2dvZgepYhMwlti8fAkbiC0ikCXxY9pqli5GDg5mgUKJlodRIGFhgWiJxxtB BnFwsAioSmzrkAIJ8wq4S9z6MpUNYpecxMljk1lBSjiB4rcfR4KYQgJuEv/eJkxg5F3AyLCK UTS1NLmgOCk911CvODG3uDQvXS85P3cTIyR4vuxgXHzM6hCjAAejEg+vx4mVIUKsiWXFlbmH GCU4mJVEeNfdAgrxpiRWVqUW5ccXleakFh9iZOLglGpg3Oy+yGlNZl7P5cWTlTSsls9JfRFS tDl5xtMVa3tzFvfN5w8MTevlftHGwlp69I1EYXzmnJNp73YkdExxFzqjWv3/l+KPFUG/1E05 Jm7vvHK95uvFFodJ5nny99KebxXxD5No12d++b3jsXhZ2L7QBBsbXwnzbgPWgopX+9jW+qTu LWM/ztulxFKckWioxVxUnAgAEkI7xPwBAAA= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Make array of struct reg_default const as well. Signed-off-by: Krzysztof Kozlowski Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Acked-by: Tony Lindgren --- drivers/mfd/twl-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index db11b4f40611..489674a2497e 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -207,7 +207,7 @@ static struct twl_mapping twl4030_map[] = { { 2, TWL5031_BASEADD_INTERRUPTS }, }; -static struct reg_default twl4030_49_defaults[] = { +static const struct reg_default twl4030_49_defaults[] = { /* Audio Registers */ { 0x01, 0x00}, /* CODEC_MODE */ { 0x02, 0x00}, /* OPTION */ @@ -306,7 +306,7 @@ static const struct regmap_access_table twl4030_49_volatile_table = { .n_yes_ranges = ARRAY_SIZE(twl4030_49_volatile_ranges), }; -static struct regmap_config twl4030_regmap_config[4] = { +static const struct regmap_config twl4030_regmap_config[4] = { { /* Address 0x48 */ .reg_bits = 8, @@ -369,7 +369,7 @@ static struct twl_mapping twl6030_map[] = { { 1, TWL6030_BASEADD_GASGAUGE }, }; -static struct regmap_config twl6030_regmap_config[3] = { +static const struct regmap_config twl6030_regmap_config[3] = { { /* Address 0x48 */ .reg_bits = 8, @@ -1087,7 +1087,7 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id) struct twl4030_platform_data *pdata = dev_get_platdata(&client->dev); struct device_node *node = client->dev.of_node; struct platform_device *pdev; - struct regmap_config *twl_regmap_config; + const struct regmap_config *twl_regmap_config; int irq_base = 0; int status; unsigned i, num_slaves;