summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/fixed.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-10-05 17:54:56 +0200
committerMark Brown <broonie@kernel.org>2020-10-05 17:54:56 +0200
commitc6e70a6fd5ceff381059e600156d78c1b94b7c60 (patch)
treecfbe62ca93677505433a4127632d4b8b74e5bb52 /drivers/regulator/fixed.c
parentLinux 5.9-rc8 (diff)
parentregulator: bd9576: Fix print (diff)
downloadlinux-c6e70a6fd5ceff381059e600156d78c1b94b7c60.tar.xz
linux-c6e70a6fd5ceff381059e600156d78c1b94b7c60.zip
Merge remote-tracking branch 'regulator/for-5.10' into regulator-next
Diffstat (limited to 'drivers/regulator/fixed.c')
-rw-r--r--drivers/regulator/fixed.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 142a70a89153..3de7709bdcd4 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -41,14 +41,6 @@ struct fixed_dev_type {
bool has_enable_clock;
};
-static const struct fixed_dev_type fixed_voltage_data = {
- .has_enable_clock = false,
-};
-
-static const struct fixed_dev_type fixed_clkenable_data = {
- .has_enable_clock = true,
-};
-
static int reg_clock_enable(struct regulator_dev *rdev)
{
struct fixed_voltage_data *priv = rdev_get_drvdata(rdev);
@@ -131,10 +123,10 @@ of_get_fixed_voltage_config(struct device *dev,
return config;
}
-static struct regulator_ops fixed_voltage_ops = {
+static const struct regulator_ops fixed_voltage_ops = {
};
-static struct regulator_ops fixed_voltage_clkenabled_ops = {
+static const struct regulator_ops fixed_voltage_clkenabled_ops = {
.enable = reg_clock_enable,
.disable = reg_clock_disable,
.is_enabled = reg_clock_is_enabled,
@@ -260,6 +252,14 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
}
#if defined(CONFIG_OF)
+static const struct fixed_dev_type fixed_voltage_data = {
+ .has_enable_clock = false,
+};
+
+static const struct fixed_dev_type fixed_clkenable_data = {
+ .has_enable_clock = true,
+};
+
static const struct of_device_id fixed_of_match[] = {
{
.compatible = "regulator-fixed",