Commit 23ce1e5c authored by Mark Brown's avatar Mark Brown

Merge series "regulator: Fix W=1 build warning when CONFIG_OF=n" from Jisheng...

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
parents c0e53a44 8536bf81
...@@ -84,7 +84,7 @@ static int pg86x_i2c_probe(struct i2c_client *i2c) ...@@ -84,7 +84,7 @@ static int pg86x_i2c_probe(struct i2c_client *i2c)
return 0; 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,88pg867" },
{ .compatible = "marvell,88pg868" }, { .compatible = "marvell,88pg868" },
{ } { }
......
...@@ -125,7 +125,7 @@ static irqreturn_t da9210_irq_handler(int irq, void *data) ...@@ -125,7 +125,7 @@ static irqreturn_t da9210_irq_handler(int irq, void *data)
* I2C driver interface functions * 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", }, { .compatible = "dlg,da9210", },
{ } { }
}; };
......
...@@ -436,7 +436,7 @@ static struct fan53555_platform_data *fan53555_parse_dt(struct device *dev, ...@@ -436,7 +436,7 @@ static struct fan53555_platform_data *fan53555_parse_dt(struct device *dev,
return pdata; 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", .compatible = "fcs,fan53526",
.data = (void *)FAN53526_VENDOR_FAIRCHILD, .data = (void *)FAN53526_VENDOR_FAIRCHILD,
......
...@@ -41,14 +41,6 @@ struct fixed_dev_type { ...@@ -41,14 +41,6 @@ struct fixed_dev_type {
bool has_enable_clock; 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) static int reg_clock_enable(struct regulator_dev *rdev)
{ {
struct fixed_voltage_data *priv = rdev_get_drvdata(rdev); struct fixed_voltage_data *priv = rdev_get_drvdata(rdev);
...@@ -260,6 +252,14 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) ...@@ -260,6 +252,14 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
} }
#if defined(CONFIG_OF) #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[] = { static const struct of_device_id fixed_of_match[] = {
{ {
.compatible = "regulator-fixed", .compatible = "regulator-fixed",
......
...@@ -457,7 +457,7 @@ static const struct i2c_device_id ltc3589_i2c_id[] = { ...@@ -457,7 +457,7 @@ static const struct i2c_device_id ltc3589_i2c_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, 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", .compatible = "lltc,ltc3589",
.data = (void *)LTC3589, .data = (void *)LTC3589,
......
...@@ -368,7 +368,7 @@ static const struct i2c_device_id ltc3676_i2c_id[] = { ...@@ -368,7 +368,7 @@ static const struct i2c_device_id ltc3676_i2c_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, 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" }, { .compatible = "lltc,ltc3676" },
{ }, { },
}; };
......
...@@ -201,7 +201,7 @@ static int of_get_max1586_platform_data(struct device *dev, ...@@ -201,7 +201,7 @@ static int of_get_max1586_platform_data(struct device *dev,
return 0; 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", }, { .compatible = "maxim,max1586", },
{}, {},
}; };
......
...@@ -274,7 +274,7 @@ static int max77826_i2c_probe(struct i2c_client *client) ...@@ -274,7 +274,7 @@ static int max77826_i2c_probe(struct i2c_client *client)
return max77826_read_device_id(regmap, dev); 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" }, { .compatible = "maxim,max77826" },
{ /* sentinel */ } { /* sentinel */ }
}; };
......
...@@ -390,7 +390,7 @@ static int pwm_regulator_probe(struct platform_device *pdev) ...@@ -390,7 +390,7 @@ static int pwm_regulator_probe(struct platform_device *pdev)
return 0; 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" }, { .compatible = "pwm-regulator" },
{ }, { },
}; };
......
...@@ -967,7 +967,7 @@ static int rpmh_regulator_probe(struct platform_device *pdev) ...@@ -967,7 +967,7 @@ static int rpmh_regulator_probe(struct platform_device *pdev)
return 0; 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", .compatible = "qcom,pm8005-rpmh-regulators",
.data = pm8005_vreg_data, .data = pm8005_vreg_data,
......
...@@ -101,7 +101,7 @@ static int stm32_booster_probe(struct platform_device *pdev) ...@@ -101,7 +101,7 @@ static int stm32_booster_probe(struct platform_device *pdev)
return 0; 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", .compatible = "st,stm32h7-booster",
.data = (void *)&stm32h7_booster_desc .data = (void *)&stm32h7_booster_desc
......
...@@ -166,7 +166,7 @@ static int stm32_pwr_regulator_probe(struct platform_device *pdev) ...@@ -166,7 +166,7 @@ static int stm32_pwr_regulator_probe(struct platform_device *pdev)
return ret; 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", }, { .compatible = "st,stm32mp1,pwr-reg", },
{}, {},
}; };
......
...@@ -284,7 +284,7 @@ static const struct dev_pm_ops stm32_vrefbuf_pm_ops = { ...@@ -284,7 +284,7 @@ static const struct dev_pm_ops stm32_vrefbuf_pm_ops = {
NULL) 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", }, { .compatible = "st,stm32-vrefbuf", },
{}, {},
}; };
......
...@@ -123,7 +123,7 @@ static int sy8106a_i2c_probe(struct i2c_client *i2c) ...@@ -123,7 +123,7 @@ static int sy8106a_i2c_probe(struct i2c_client *i2c)
return 0; 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" }, { .compatible = "silergy,sy8106a" },
{ }, { },
}; };
......
...@@ -316,7 +316,7 @@ static int tps_65023_probe(struct i2c_client *client, ...@@ -316,7 +316,7 @@ static int tps_65023_probe(struct i2c_client *client,
return 0; 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,tps65020", .data = &tps65020_drv_data},
{ .compatible = "ti,tps65021", .data = &tps65021_drv_data}, { .compatible = "ti,tps65021", .data = &tps65021_drv_data},
{ .compatible = "ti,tps65023", .data = &tps65023_drv_data}, { .compatible = "ti,tps65023", .data = &tps65023_drv_data},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment