From patchwork Mon Jan 5 09:01:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5565761 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 EA1DF9F4DC for ; Mon, 5 Jan 2015 09:08:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C75420117 for ; Mon, 5 Jan 2015 09:08:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D413200DE for ; Mon, 5 Jan 2015 09:08:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753645AbbAEJFz (ORCPT ); Mon, 5 Jan 2015 04:05:55 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:31337 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753502AbbAEJBq (ORCPT ); Mon, 5 Jan 2015 04:01:46 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NHP00I4Z59MMV60@mailout4.w1.samsung.com>; Mon, 05 Jan 2015 09:05:46 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-62-54aa52f8ff11 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 7C.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 14/14] mfd: twl6040: Constify struct regmap_config and reg_default array Date: Mon, 05 Jan 2015 10:01:33 +0100 Message-id: <1420448493-9355-14-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/glaFGPxZrGrx+oWhxf2vRxkt Lu+aw2Yxe0k/i8XpblaL/Ve8HNg8vn2dxOJx59oeNo95JwM9+rasYvT4vEkugDWKyyYlNSez LLVI3y6BK+P8bO2CxZwVyw+fZG1gvMDexcjJISFgIrH+x2o2CFtM4sK99UA2F4eQwFJGiYmb /7BCOH1MEjNnbwbrYBMwlti8fAlYh4hAlsSPaatZuhg5OJgFCiVaHkaBhIUFoiS2969hBLFZ BFQl5j/6BVbOK+AusXj3HKjFchInj01mBWnlBIrffhwJYgoJuEn8e5swgZF3ASPDKkbR1NLk guKk9FxDveLE3OLSvHS95PzcTYyQ4Pmyg3HxMatDjAIcjEo8vB4nVoYIsSaWFVfmHmKU4GBW EuFddwsoxJuSWFmVWpQfX1Sak1p8iJGJg1OqgbG6fd/m6SE65veE6vYFn7fvz5EvEDr0TCnA 4NSD1XcWLGOvVJhkvfFUi5VNRZvq0oj/H313Xzxv8122denk5U4+Ji+ufl6jYdMSxVUw+cHX h9PaFEX15usLms+aEPlBtWbPpmO6HJInbwvq6ylkMnvdq6j8zydb9+iT5OtcoT9Kb+zkTj2o 01diKc5INNRiLipOBACWAimG/AEAAA== 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/twl6040.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c index 9687645162ae..f71ee3dbc2a2 100644 --- a/drivers/mfd/twl6040.c +++ b/drivers/mfd/twl6040.c @@ -44,7 +44,7 @@ #define VIBRACTRL_MEMBER(reg) ((reg == TWL6040_REG_VIBCTLL) ? 0 : 1) #define TWL6040_NUM_SUPPLIES (2) -static struct reg_default twl6040_defaults[] = { +static const struct reg_default twl6040_defaults[] = { { 0x01, 0x4B }, /* REG_ASICID (ro) */ { 0x02, 0x00 }, /* REG_ASICREV (ro) */ { 0x03, 0x00 }, /* REG_INTID */ @@ -580,7 +580,7 @@ static bool twl6040_writeable_reg(struct device *dev, unsigned int reg) } } -static struct regmap_config twl6040_regmap_config = { +static const struct regmap_config twl6040_regmap_config = { .reg_bits = 8, .val_bits = 8,