mirror of
https://gitee.com/openharmony/kernel_linux
synced 2025-05-21 14:16:41 +00:00
regulators: Clean out unused code in ab8500 regulators
The find_regulator function was unused so it has been removed. The ab8500 pointer in the regulator info structure was unused and so it has also been removed. Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
parent
65e03ed2d0
commit
deaca1ee82
@ -29,7 +29,6 @@
|
|||||||
/**
|
/**
|
||||||
* struct ab8500_regulator_info - ab8500 regulator information
|
* struct ab8500_regulator_info - ab8500 regulator information
|
||||||
* @desc: regulator description
|
* @desc: regulator description
|
||||||
* @ab8500: ab8500 parent
|
|
||||||
* @regulator_dev: regulator device
|
* @regulator_dev: regulator device
|
||||||
* @max_uV: maximum voltage (for variable voltage supplies)
|
* @max_uV: maximum voltage (for variable voltage supplies)
|
||||||
* @min_uV: minimum voltage (for variable voltage supplies)
|
* @min_uV: minimum voltage (for variable voltage supplies)
|
||||||
@ -47,7 +46,6 @@
|
|||||||
struct ab8500_regulator_info {
|
struct ab8500_regulator_info {
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
struct regulator_desc desc;
|
struct regulator_desc desc;
|
||||||
struct ab8500 *ab8500;
|
|
||||||
struct regulator_dev *regulator;
|
struct regulator_dev *regulator;
|
||||||
int max_uV;
|
int max_uV;
|
||||||
int min_uV;
|
int min_uV;
|
||||||
@ -345,19 +343,6 @@ static struct ab8500_regulator_info ab8500_regulator_info[] = {
|
|||||||
AB8500_FIXED_LDO(ANA, 1200, 0x04, 0x06, 0xc, 0x4),
|
AB8500_FIXED_LDO(ANA, 1200, 0x04, 0x06, 0xc, 0x4),
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct ab8500_regulator_info *find_regulator_info(int id)
|
|
||||||
{
|
|
||||||
struct ab8500_regulator_info *info;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(ab8500_regulator_info); i++) {
|
|
||||||
info = &ab8500_regulator_info[i];
|
|
||||||
if (info->desc.id == id)
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
|
static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
|
struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
|
||||||
@ -383,7 +368,6 @@ static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
|
|||||||
/* assign per-regulator data */
|
/* assign per-regulator data */
|
||||||
info = &ab8500_regulator_info[i];
|
info = &ab8500_regulator_info[i];
|
||||||
info->dev = &pdev->dev;
|
info->dev = &pdev->dev;
|
||||||
info->ab8500 = ab8500;
|
|
||||||
|
|
||||||
info->regulator = regulator_register(&info->desc, &pdev->dev,
|
info->regulator = regulator_register(&info->desc, &pdev->dev,
|
||||||
&pdata->regulator[i], info);
|
&pdata->regulator[i], info);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user