From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751864AbdA1OKY (ORCPT ); Sat, 28 Jan 2017 09:10:24 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34424 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751285AbdA1OKQ (ORCPT ); Sat, 28 Jan 2017 09:10:16 -0500 From: Bhumika Goyal To: julia.lawall@lip6.fr, lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] regulator: hi655x-regulator: constify regulator_ops structure Date: Sat, 28 Jan 2017 19:40:08 +0530 Message-Id: <1485612608-29828-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/hi655x-regulator.o text data bss dec hex filename 689 3120 0 3809 ee1 regulator/hi655x-regulator.o File size after: drivers/regulator/hi655x-regulator.o text data bss dec hex filename 1201 2608 0 3809 ee1 regulator/hi655x-regulator.o Signed-off-by: Bhumika Goyal --- drivers/regulator/hi655x-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/hi655x-regulator.c b/drivers/regulator/hi655x-regulator.c index aca1846..065c100 100644 --- a/drivers/regulator/hi655x-regulator.c +++ b/drivers/regulator/hi655x-regulator.c @@ -96,7 +96,7 @@ static int hi655x_disable(struct regulator_dev *rdev) return ret; } -static struct regulator_ops hi655x_regulator_ops = { +static const struct regulator_ops hi655x_regulator_ops = { .enable = regulator_enable_regmap, .disable = hi655x_disable, .is_enabled = hi655x_is_enabled, @@ -105,7 +105,7 @@ static int hi655x_disable(struct regulator_dev *rdev) .set_voltage_sel = regulator_set_voltage_sel_regmap, }; -static struct regulator_ops hi655x_ldo_linear_ops = { +static const struct regulator_ops hi655x_ldo_linear_ops = { .enable = regulator_enable_regmap, .disable = hi655x_disable, .is_enabled = hi655x_is_enabled, -- 1.9.1