提交 78258064 编写于 作者: J Jett.Zhou 提交者: Samuel Ortiz

mfd: Code cleanup for pm8606 sub-dev initialization

Collect all the sub-devices of pm8606 initialization into
device_pm8606_init() for code clean up.
Signed-off-by: NJett.Zhou <jtzhou@marvell.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 23de435a
......@@ -860,6 +860,15 @@ static void __devinit device_8607_init(struct pm860x_chip *chip,
return;
}
static void __devinit device_8606_init(struct pm860x_chip *chip,
struct i2c_client *i2c,
struct pm860x_platform_data *pdata)
{
device_osc_init(i2c);
device_bk_init(chip, pdata);
device_led_init(chip, pdata);
}
int __devinit pm860x_device_init(struct pm860x_chip *chip,
struct pm860x_platform_data *pdata)
{
......@@ -867,9 +876,7 @@ int __devinit pm860x_device_init(struct pm860x_chip *chip,
switch (chip->id) {
case CHIP_PM8606:
device_osc_init(chip->client);
device_bk_init(chip, pdata);
device_led_init(chip, pdata);
device_8606_init(chip, chip->client, pdata);
break;
case CHIP_PM8607:
device_8607_init(chip, chip->client, pdata);
......@@ -879,9 +886,7 @@ int __devinit pm860x_device_init(struct pm860x_chip *chip,
if (chip->companion) {
switch (chip->id) {
case CHIP_PM8607:
device_osc_init(chip->companion);
device_bk_init(chip, pdata);
device_led_init(chip, pdata);
device_8606_init(chip, chip->companion, pdata);
break;
case CHIP_PM8606:
device_8607_init(chip, chip->companion, pdata);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册