From f70575805708cabdedea7498aaa3f710fde4d920 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 31 Jan 2024 03:29:01 +0000 Subject: [PATCH] add lvds1024*800 --- kernel/drivers/regulator/tps6524x-regulator.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/kernel/drivers/regulator/tps6524x-regulator.c b/kernel/drivers/regulator/tps6524x-regulator.c index 67cac26..740aecc 100644 --- a/kernel/drivers/regulator/tps6524x-regulator.c +++ b/kernel/drivers/regulator/tps6524x-regulator.c @@ -137,7 +137,6 @@ struct spi_device *spi; struct mutex lock; struct regulator_desc desc[N_REGULATORS]; - struct regulator_dev *rdev[N_REGULATORS]; }; static int __read_reg(struct tps6524x *hw, int reg) @@ -565,7 +564,7 @@ return read_field(hw, &info->enable); } -static struct regulator_ops regulator_ops = { +static const struct regulator_ops regulator_ops = { .is_enabled = is_supply_enabled, .enable = enable_supply, .disable = disable_supply, @@ -584,6 +583,7 @@ const struct supply_info *info = supply_info; struct regulator_init_data *init_data; struct regulator_config config = { }; + struct regulator_dev *rdev; int i; init_data = dev_get_platdata(dev); @@ -616,10 +616,9 @@ config.init_data = init_data; config.driver_data = hw; - hw->rdev[i] = devm_regulator_register(dev, &hw->desc[i], - &config); - if (IS_ERR(hw->rdev[i])) - return PTR_ERR(hw->rdev[i]); + rdev = devm_regulator_register(dev, &hw->desc[i], &config); + if (IS_ERR(rdev)) + return PTR_ERR(rdev); } return 0; -- Gitblit v1.6.2