mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
mfd: 88pm860x: Avoid to check resource for preg regulator
Since PREG regulator is the only one regulator in 88PM8606, and other regulators are in 88PM8607. Checking resource as identifying regulator is not a good way. We can use NULL resource to indentify PREG regulator. Signed-off-by: Haojian Zhuang <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
e7a7810ae0
commit
ff13e9e256
2 changed files with 20 additions and 20 deletions
|
|
@ -150,10 +150,6 @@ static struct resource charger_resources[] __devinitdata = {
|
|||
{PM8607_IRQ_VCHG, PM8607_IRQ_VCHG, "vchg voltage", IORESOURCE_IRQ,},
|
||||
};
|
||||
|
||||
static struct resource preg_resources[] __devinitdata = {
|
||||
{PM8606_ID_PREG, PM8606_ID_PREG, "preg", IORESOURCE_REG,},
|
||||
};
|
||||
|
||||
static struct resource rtc_resources[] __devinitdata = {
|
||||
{PM8607_IRQ_RTC, PM8607_IRQ_RTC, "rtc", IORESOURCE_IRQ,},
|
||||
};
|
||||
|
|
@ -960,10 +956,8 @@ static void __devinit device_power_init(struct pm860x_chip *chip,
|
|||
|
||||
power_devs[2].platform_data = &preg_init_data;
|
||||
power_devs[2].pdata_size = sizeof(struct regulator_init_data);
|
||||
power_devs[2].num_resources = ARRAY_SIZE(preg_resources);
|
||||
power_devs[2].resources = &preg_resources[0],
|
||||
ret = mfd_add_devices(chip->dev, 0, &power_devs[2], 1,
|
||||
&preg_resources[0], chip->irq_base, NULL);
|
||||
NULL, chip->irq_base, NULL);
|
||||
if (ret < 0)
|
||||
dev_err(chip->dev, "Failed to add preg subdev\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue