regulator: s2mps11: Convert to devm_regulator_register()
Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Sangbeom Kim <sbkim73@samsung.com>
This commit is contained in:
parent
b6b7709cf9
commit
b707a27445
|
@ -453,27 +453,10 @@ common_reg:
|
|||
ret = PTR_ERR(s2mps11->rdev[i]);
|
||||
dev_err(&pdev->dev, "regulator init failed for %d\n",
|
||||
i);
|
||||
s2mps11->rdev[i] = NULL;
|
||||
goto err;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
err:
|
||||
for (i = 0; i < S2MPS11_REGULATOR_MAX; i++)
|
||||
regulator_unregister(s2mps11->rdev[i]);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int s2mps11_pmic_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct s2mps11_info *s2mps11 = platform_get_drvdata(pdev);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < S2MPS11_REGULATOR_MAX; i++)
|
||||
regulator_unregister(s2mps11->rdev[i]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -489,7 +472,6 @@ static struct platform_driver s2mps11_pmic_driver = {
|
|||
.owner = THIS_MODULE,
|
||||
},
|
||||
.probe = s2mps11_pmic_probe,
|
||||
.remove = s2mps11_pmic_remove,
|
||||
.id_table = s2mps11_pmic_id,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue