From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751893AbdA1ONx (ORCPT ); Sat, 28 Jan 2017 09:13:53 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33826 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751339AbdA1ONo (ORCPT ); Sat, 28 Jan 2017 09:13:44 -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: fixed: constify regulator_ops structure Date: Sat, 28 Jan 2017 19:36:09 +0530 Message-Id: <1485612369-29715-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/fixed.o text data bss dec hex filename 1239 192 0 1431 597 drivers/regulator/fixed.o File size after: drivers/regulator/fixed.o text data bss dec hex filename 1592 100 128 1820 71c drivers/regulator/fixed.o Signed-off-by: Bhumika Goyal --- drivers/regulator/fixed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index a43b0e8..9619022 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -135,7 +135,7 @@ struct fixed_voltage_data { return config; } -static struct regulator_ops fixed_voltage_ops = { +static const struct regulator_ops fixed_voltage_ops = { }; static int reg_fixed_voltage_probe(struct platform_device *pdev) -- 1.9.1