From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751814AbdA1OXu (ORCPT ); Sat, 28 Jan 2017 09:23:50 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36700 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751306AbdA1OXo (ORCPT ); Sat, 28 Jan 2017 09:23:44 -0500 From: Bhumika Goyal To: julia.lawall@lip6.fr, lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org, cw00.choi@samsung.com, krzk@kernel.org, b.zolnierkie@samsung.com Cc: Bhumika Goyal Subject: [PATCH] regulator: max77686-regulator: constify regulator_ops structure Date: Sat, 28 Jan 2017 19:52:24 +0530 Message-Id: <1485613344-30168-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/max77686-regulator.o text data bss dec hex filename 9904 1320 0 11224 2bd8 regulator/max77686-regulator.o File size after: drivers/regulator/max77686-regulator.o text data bss dec hex filename 10928 280 0 11208 2bc8 regulator/max77686-regulator.o Signed-off-by: Bhumika Goyal --- drivers/regulator/max77686-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/max77686-regulator.c b/drivers/regulator/max77686-regulator.c index ac4fa58..c301f37 100644 --- a/drivers/regulator/max77686-regulator.c +++ b/drivers/regulator/max77686-regulator.c @@ -289,7 +289,7 @@ static int max77686_of_parse_cb(struct device_node *np, return 0; } -static struct regulator_ops max77686_ops = { +static const struct regulator_ops max77686_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, @@ -301,7 +301,7 @@ static int max77686_of_parse_cb(struct device_node *np, .set_suspend_mode = max77686_set_suspend_mode, }; -static struct regulator_ops max77686_ldo_ops = { +static const struct regulator_ops max77686_ldo_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, @@ -314,7 +314,7 @@ static int max77686_of_parse_cb(struct device_node *np, .set_suspend_disable = max77686_set_suspend_disable, }; -static struct regulator_ops max77686_buck1_ops = { +static const struct regulator_ops max77686_buck1_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, @@ -326,7 +326,7 @@ static int max77686_of_parse_cb(struct device_node *np, .set_suspend_disable = max77686_set_suspend_disable, }; -static struct regulator_ops max77686_buck_dvs_ops = { +static const struct regulator_ops max77686_buck_dvs_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, -- 1.9.1