diff options
author | Mark Brown <broonie@kernel.org> | 2020-08-21 18:38:50 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-08-21 18:38:50 +0200 |
commit | 23ce1e5c27396e39efabb58714142e8f10ce1f0c (patch) | |
tree | 6ecc14ce468c9a8dfc8a6a3fc2f3f1653255d460 /drivers/regulator | |
parent | regulator: dbx500: Remove unused debugfs goto label (diff) | |
parent | regulator: tps65023: Fix W=1 build warning when CONFIG_OF=n (diff) | |
download | linux-23ce1e5c27396e39efabb58714142e8f10ce1f0c.tar.xz linux-23ce1e5c27396e39efabb58714142e8f10ce1f0c.zip |
Merge series "regulator: Fix W=1 build warning when CONFIG_OF=n" from Jisheng Zhang <Jisheng.Zhang@synaptics.com>:
Fixing W=1 build warning when no support for device tree is there.
Since v1:
- fix the warning with __maybe_unused instead of CONFIG_OF macro
- add 3 more patches to fix the same issue
Jisheng Zhang (15):
regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n
regulator: da9210: Fix W=1 build warning when CONFIG_OF=n
regulator: fan53555: Fix W=1 build warning when CONFIG_OF=n
regulator: fixed: Fix W=1 build warnings when CONFIG_OF=n
regulator: ltc3589: Fix W=1 build warning when CONFIG_OF=n
regulator: ltc3676: Fix W=1 build warning when CONFIG_OF=n
regulator: max1586: Fix W=1 build warning when CONFIG_OF=n
regulator: max77826: Fix W=1 build warning when CONFIG_OF=n
regulator: pwm: Fix W=1 build warning when CONFIG_OF=n
regulator: stm32-pwr: Fix W=1 build warning when CONFIG_OF=n
regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n
regulator: sy8106a: Fix W=1 build warning when CONFIG_OF=n
regulator: qcom-rpmh: Fix W=1 build warning when CONFIG_OF=n
regulator: stm32-booster: Fix W=1 build warning when CONFIG_OF=n
regulator: tps65023: Fix W=1 build warning when CONFIG_OF=n
drivers/regulator/88pg86x.c | 2 +-
drivers/regulator/da9210-regulator.c | 2 +-
drivers/regulator/fan53555.c | 2 +-
drivers/regulator/fixed.c | 16 ++++++++--------
drivers/regulator/ltc3589.c | 2 +-
drivers/regulator/ltc3676.c | 2 +-
drivers/regulator/max1586.c | 2 +-
drivers/regulator/max77826-regulator.c | 2 +-
drivers/regulator/pwm-regulator.c | 2 +-
drivers/regulator/qcom-rpmh-regulator.c | 2 +-
drivers/regulator/stm32-booster.c | 2 +-
drivers/regulator/stm32-pwr.c | 2 +-
drivers/regulator/stm32-vrefbuf.c | 2 +-
drivers/regulator/sy8106a-regulator.c | 2 +-
drivers/regulator/tps65023-regulator.c | 2 +-
15 files changed, 22 insertions(+), 22 deletions(-)
--
2.28.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/88pg86x.c | 2 | ||||
-rw-r--r-- | drivers/regulator/da9210-regulator.c | 2 | ||||
-rw-r--r-- | drivers/regulator/fan53555.c | 2 | ||||
-rw-r--r-- | drivers/regulator/fixed.c | 16 | ||||
-rw-r--r-- | drivers/regulator/ltc3589.c | 2 | ||||
-rw-r--r-- | drivers/regulator/ltc3676.c | 2 | ||||
-rw-r--r-- | drivers/regulator/max1586.c | 2 | ||||
-rw-r--r-- | drivers/regulator/max77826-regulator.c | 2 | ||||
-rw-r--r-- | drivers/regulator/pwm-regulator.c | 2 | ||||
-rw-r--r-- | drivers/regulator/qcom-rpmh-regulator.c | 2 | ||||
-rw-r--r-- | drivers/regulator/stm32-booster.c | 2 | ||||
-rw-r--r-- | drivers/regulator/stm32-pwr.c | 2 | ||||
-rw-r--r-- | drivers/regulator/stm32-vrefbuf.c | 2 | ||||
-rw-r--r-- | drivers/regulator/sy8106a-regulator.c | 2 | ||||
-rw-r--r-- | drivers/regulator/tps65023-regulator.c | 2 |
15 files changed, 22 insertions, 22 deletions
diff --git a/drivers/regulator/88pg86x.c b/drivers/regulator/88pg86x.c index 71cfa2c5de5e..e91d5885c5ef 100644 --- a/drivers/regulator/88pg86x.c +++ b/drivers/regulator/88pg86x.c @@ -84,7 +84,7 @@ static int pg86x_i2c_probe(struct i2c_client *i2c) return 0; } -static const struct of_device_id pg86x_dt_ids [] = { +static const struct of_device_id __maybe_unused pg86x_dt_ids[] = { { .compatible = "marvell,88pg867" }, { .compatible = "marvell,88pg868" }, { } diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c index 0cdeb6186529..2aea442b62fe 100644 --- a/drivers/regulator/da9210-regulator.c +++ b/drivers/regulator/da9210-regulator.c @@ -125,7 +125,7 @@ error_i2c: * I2C driver interface functions */ -static const struct of_device_id da9210_dt_ids[] = { +static const struct of_device_id __maybe_unused da9210_dt_ids[] = { { .compatible = "dlg,da9210", }, { } }; diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 00c83492f774..aa426183b6a1 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -436,7 +436,7 @@ static struct fan53555_platform_data *fan53555_parse_dt(struct device *dev, return pdata; } -static const struct of_device_id fan53555_dt_ids[] = { +static const struct of_device_id __maybe_unused fan53555_dt_ids[] = { { .compatible = "fcs,fan53526", .data = (void *)FAN53526_VENDOR_FAIRCHILD, diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index 142a70a89153..5a03fd86ad0a 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); @@ -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", diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c index 9a037fdc5fc5..fa563aacf742 100644 --- a/drivers/regulator/ltc3589.c +++ b/drivers/regulator/ltc3589.c @@ -457,7 +457,7 @@ static const struct i2c_device_id ltc3589_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, ltc3589_i2c_id); -static const struct of_device_id ltc3589_of_match[] = { +static const struct of_device_id __maybe_unused ltc3589_of_match[] = { { .compatible = "lltc,ltc3589", .data = (void *)LTC3589, diff --git a/drivers/regulator/ltc3676.c b/drivers/regulator/ltc3676.c index 093b3e4a6303..557727b54f0e 100644 --- a/drivers/regulator/ltc3676.c +++ b/drivers/regulator/ltc3676.c @@ -368,7 +368,7 @@ static const struct i2c_device_id ltc3676_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, ltc3676_i2c_id); -static const struct of_device_id ltc3676_of_match[] = { +static const struct of_device_id __maybe_unused ltc3676_of_match[] = { { .compatible = "lltc,ltc3676" }, { }, }; diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c index f8941025780b..d4958394e608 100644 --- a/drivers/regulator/max1586.c +++ b/drivers/regulator/max1586.c @@ -201,7 +201,7 @@ static int of_get_max1586_platform_data(struct device *dev, return 0; } -static const struct of_device_id max1586_of_match[] = { +static const struct of_device_id __maybe_unused max1586_of_match[] = { { .compatible = "maxim,max1586", }, {}, }; diff --git a/drivers/regulator/max77826-regulator.c b/drivers/regulator/max77826-regulator.c index 502ab6afc814..f9e2e884ff54 100644 --- a/drivers/regulator/max77826-regulator.c +++ b/drivers/regulator/max77826-regulator.c @@ -274,7 +274,7 @@ static int max77826_i2c_probe(struct i2c_client *client) return max77826_read_device_id(regmap, dev); } -static const struct of_device_id max77826_of_match[] = { +static const struct of_device_id __maybe_unused max77826_of_match[] = { { .compatible = "maxim,max77826" }, { /* sentinel */ } }; diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c index 3234b118b53e..d250e60f1625 100644 --- a/drivers/regulator/pwm-regulator.c +++ b/drivers/regulator/pwm-regulator.c @@ -390,7 +390,7 @@ static int pwm_regulator_probe(struct platform_device *pdev) return 0; } -static const struct of_device_id pwm_of_match[] = { +static const struct of_device_id __maybe_unused pwm_of_match[] = { { .compatible = "pwm-regulator" }, { }, }; diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index 08dcc614efa7..d488325499a9 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -967,7 +967,7 @@ static int rpmh_regulator_probe(struct platform_device *pdev) return 0; } -static const struct of_device_id rpmh_regulator_match_table[] = { +static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = { { .compatible = "qcom,pm8005-rpmh-regulators", .data = pm8005_vreg_data, diff --git a/drivers/regulator/stm32-booster.c b/drivers/regulator/stm32-booster.c index 03f162ffd144..3136ea8a35d5 100644 --- a/drivers/regulator/stm32-booster.c +++ b/drivers/regulator/stm32-booster.c @@ -101,7 +101,7 @@ static int stm32_booster_probe(struct platform_device *pdev) return 0; } -static const struct of_device_id stm32_booster_of_match[] = { +static const struct of_device_id __maybe_unused stm32_booster_of_match[] = { { .compatible = "st,stm32h7-booster", .data = (void *)&stm32h7_booster_desc diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c index e0e627b0106e..2a42acb7c24e 100644 --- a/drivers/regulator/stm32-pwr.c +++ b/drivers/regulator/stm32-pwr.c @@ -166,7 +166,7 @@ static int stm32_pwr_regulator_probe(struct platform_device *pdev) return ret; } -static const struct of_device_id stm32_pwr_of_match[] = { +static const struct of_device_id __maybe_unused stm32_pwr_of_match[] = { { .compatible = "st,stm32mp1,pwr-reg", }, {}, }; diff --git a/drivers/regulator/stm32-vrefbuf.c b/drivers/regulator/stm32-vrefbuf.c index 992bc18101ef..161622ea7259 100644 --- a/drivers/regulator/stm32-vrefbuf.c +++ b/drivers/regulator/stm32-vrefbuf.c @@ -284,7 +284,7 @@ static const struct dev_pm_ops stm32_vrefbuf_pm_ops = { NULL) }; -static const struct of_device_id stm32_vrefbuf_of_match[] = { +static const struct of_device_id __maybe_unused stm32_vrefbuf_of_match[] = { { .compatible = "st,stm32-vrefbuf", }, {}, }; diff --git a/drivers/regulator/sy8106a-regulator.c b/drivers/regulator/sy8106a-regulator.c index 2222e739e62b..c119f85259a5 100644 --- a/drivers/regulator/sy8106a-regulator.c +++ b/drivers/regulator/sy8106a-regulator.c @@ -123,7 +123,7 @@ static int sy8106a_i2c_probe(struct i2c_client *i2c) return 0; } -static const struct of_device_id sy8106a_i2c_of_match[] = { +static const struct of_device_id __maybe_unused sy8106a_i2c_of_match[] = { { .compatible = "silergy,sy8106a" }, { }, }; diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c index 795d459ff3cf..f25806531c7e 100644 --- a/drivers/regulator/tps65023-regulator.c +++ b/drivers/regulator/tps65023-regulator.c @@ -316,7 +316,7 @@ static int tps_65023_probe(struct i2c_client *client, return 0; } -static const struct of_device_id tps65023_of_match[] = { +static const struct of_device_id __maybe_unused tps65023_of_match[] = { { .compatible = "ti,tps65020", .data = &tps65020_drv_data}, { .compatible = "ti,tps65021", .data = &tps65021_drv_data}, { .compatible = "ti,tps65023", .data = &tps65023_drv_data}, |