hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/regulator/bd9571mwv-regulator.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * ROHM BD9571MWV-M regulator driver
34 *
45 * Copyright (C) 2017 Marek Vasut <marek.vasut+renesas@gmail.com>
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
10
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11
- * kind, whether expressed or implied; without even the implied warranty
12
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License version 2 for more details.
146 *
157 * Based on the TPS65086 driver
168 *
....@@ -108,7 +100,7 @@
108100 }
109101
110102 /* Operations permitted on AVS voltage regulator */
111
-static struct regulator_ops avs_ops = {
103
+static const struct regulator_ops avs_ops = {
112104 .set_voltage_sel = bd9571mwv_avs_set_voltage_sel_regmap,
113105 .map_voltage = regulator_map_voltage_linear,
114106 .get_voltage_sel = bd9571mwv_avs_get_voltage_sel_regmap,
....@@ -116,7 +108,7 @@
116108 };
117109
118110 /* Operations permitted on voltage regulators */
119
-static struct regulator_ops reg_ops = {
111
+static const struct regulator_ops reg_ops = {
120112 .set_voltage_sel = bd9571mwv_reg_set_voltage_sel_regmap,
121113 .map_voltage = regulator_map_voltage_linear,
122114 .get_voltage_sel = regulator_get_voltage_sel_regmap,
....@@ -124,13 +116,13 @@
124116 };
125117
126118 /* Operations permitted on voltage monitors */
127
-static struct regulator_ops vid_ops = {
119
+static const struct regulator_ops vid_ops = {
128120 .map_voltage = regulator_map_voltage_linear,
129121 .get_voltage_sel = regulator_get_voltage_sel_regmap,
130122 .list_voltage = regulator_list_voltage_linear,
131123 };
132124
133
-static struct regulator_desc regulators[] = {
125
+static const struct regulator_desc regulators[] = {
134126 BD9571MWV_REG("VD09", "vd09", VD09, avs_ops, 0, 0x7f,
135127 0x6f, 600000, 10000, 0x3c),
136128 BD9571MWV_REG("VD18", "vd18", VD18, vid_ops, BD9571MWV_VD18_VID, 0xf,