From patchwork Sat Mar 11 19:01:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9618987 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 CE6E6604D9 for ; Sat, 11 Mar 2017 19:03:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD98F286AE for ; Sat, 11 Mar 2017 19:03:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B26CB28734; Sat, 11 Mar 2017 19:03:11 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68521286B4 for ; Sat, 11 Mar 2017 19:03:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933638AbdCKTC4 (ORCPT ); Sat, 11 Mar 2017 14:02:56 -0500 Received: from mail.kernel.org ([198.145.29.136]:32902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933898AbdCKTBy (ORCPT ); Sat, 11 Mar 2017 14:01:54 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D99EA20260; Sat, 11 Mar 2017 19:01:46 +0000 (UTC) Received: from localhost.localdomain (bzq-109-67-52-244.red.bezeqint.net [109.67.52.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A6AFD20431; Sat, 11 Mar 2017 19:01:42 +0000 (UTC) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Sangbeom Kim , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/7] regulator: max8660: Constify regulator_ops Date: Sat, 11 Mar 2017 21:01:20 +0200 Message-Id: <20170311190124.11512-3-krzk@kernel.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170311190124.11512-1-krzk@kernel.org> References: <20170311190124.11512-1-krzk@kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Static struct regulator_ops (except max8660_dcdc_ops) are not modified so can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski --- drivers/regulator/max8660.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c index b87f62dd484e..a6183425f27d 100644 --- a/drivers/regulator/max8660.c +++ b/drivers/regulator/max8660.c @@ -194,7 +194,7 @@ static int max8660_ldo5_set_voltage_sel(struct regulator_dev *rdev, return max8660_write(max8660, MAX8660_VCC1, 0xff, 0xc0); } -static struct regulator_ops max8660_ldo5_ops = { +static const struct regulator_ops max8660_ldo5_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .set_voltage_sel = max8660_ldo5_set_voltage_sel, @@ -252,7 +252,7 @@ static int max8660_ldo67_set_voltage_sel(struct regulator_dev *rdev, selector << 4); } -static struct regulator_ops max8660_ldo67_ops = { +static const struct regulator_ops max8660_ldo67_ops = { .is_enabled = max8660_ldo67_is_enabled, .enable = max8660_ldo67_enable, .disable = max8660_ldo67_disable,