regulator: qpnp cpr3 kryo regulator: pass descriptor to init_data parsing function
The regulator registration api's need a descriptor to access mode matching functions. qpnp-regulators, cpr3-regulators, kryo-regulators don't use that feature. Pass in a descriptor with that function pointer set to NULL. Change-Id: I0c89fa99c0b9960ce4e14e3a60ed55901bdd8b09 Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
parent
d20a687e0b
commit
3d72693d0a
3 changed files with 6 additions and 4 deletions
|
@ -3269,7 +3269,7 @@ static int cpr3_regulator_vreg_register(struct cpr3_regulator *vreg)
|
|||
int rc;
|
||||
|
||||
init_data = of_get_regulator_init_data(vreg->thread->ctrl->dev,
|
||||
vreg->of_node);
|
||||
vreg->of_node, &vreg->rdesc);
|
||||
if (!init_data) {
|
||||
cpr3_err(vreg, "regulator init data is missing\n");
|
||||
return -EINVAL;
|
||||
|
|
|
@ -813,7 +813,8 @@ static int kryo_regulator_retention_init(struct kryo_regulator *kvreg,
|
|||
struct regulator_config reg_config = {};
|
||||
int rc;
|
||||
|
||||
init_data = of_get_regulator_init_data(dev, ret_node);
|
||||
init_data = of_get_regulator_init_data(dev, ret_node,
|
||||
&kvreg->retention_desc);
|
||||
if (!init_data) {
|
||||
kvreg_err(kvreg, "regulator init data is missing\n");
|
||||
return -EINVAL;
|
||||
|
@ -971,7 +972,7 @@ static int kryo_regulator_probe(struct platform_device *pdev)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
init_data = of_get_regulator_init_data(dev, dev->of_node);
|
||||
init_data = of_get_regulator_init_data(dev, dev->of_node, NULL);
|
||||
|
||||
if (!init_data) {
|
||||
dev_err(dev, "regulator init data is missing\n");
|
||||
|
|
|
@ -1935,7 +1935,8 @@ static int qpnp_regulator_probe(struct platform_device *pdev)
|
|||
/* Check if device tree is in use. */
|
||||
if (is_dt) {
|
||||
init_data = of_get_regulator_init_data(&pdev->dev,
|
||||
pdev->dev.of_node);
|
||||
pdev->dev.of_node,
|
||||
&vreg->rdesc);
|
||||
if (!init_data) {
|
||||
dev_err(&pdev->dev, "%s: unable to allocate memory\n",
|
||||
__func__);
|
||||
|
|
Loading…
Add table
Reference in a new issue