From 4ff31cad263dd5fd9c5bae7e8a9fe3a87a5d9679 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 10 Mar 2012 08:43:02 +0800 Subject: [PATCH] --- yaml --- r: 292069 b: refs/heads/master c: 6c4efe2474d233f439540f1fa364d8a7e48c5cdf h: refs/heads/master i: 292067: dc87bf7e0e9f1f586fcfb57d924af55eb3bcc082 v: v3 --- [refs] | 2 +- trunk/drivers/regulator/s5m8767.c | 45 +++++++++++++++---------------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/[refs] b/[refs] index 6ec3ce163096..97ec5bb03ffb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 18039e0f16d50c8243fe0388a587c25a3b155ece +refs/heads/master: 6c4efe2474d233f439540f1fa364d8a7e48c5cdf diff --git a/trunk/drivers/regulator/s5m8767.c b/trunk/drivers/regulator/s5m8767.c index 9d5d9159040f..611d02d70b6d 100644 --- a/trunk/drivers/regulator/s5m8767.c +++ b/trunk/drivers/regulator/s5m8767.c @@ -547,6 +547,27 @@ static __devinit int s5m8767_pmic_probe(struct platform_device *pdev) return -ENODEV; } + if (pdata->buck2_gpiodvs) { + if (pdata->buck3_gpiodvs || pdata->buck4_gpiodvs) { + dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n"); + return -EINVAL; + } + } + + if (pdata->buck3_gpiodvs) { + if (pdata->buck2_gpiodvs || pdata->buck4_gpiodvs) { + dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n"); + return -EINVAL; + } + } + + if (pdata->buck4_gpiodvs) { + if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs) { + dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n"); + return -EINVAL; + } + } + s5m8767 = devm_kzalloc(&pdev->dev, sizeof(struct s5m8767_info), GFP_KERNEL); if (!s5m8767) @@ -640,30 +661,6 @@ static __devinit int s5m8767_pmic_probe(struct platform_device *pdev) } } - if (pdata->buck2_gpiodvs) { - if (pdata->buck3_gpiodvs || pdata->buck4_gpiodvs) { - dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n"); - ret = -EINVAL; - return ret; - } - } - - if (pdata->buck3_gpiodvs) { - if (pdata->buck2_gpiodvs || pdata->buck4_gpiodvs) { - dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n"); - ret = -EINVAL; - return ret; - } - } - - if (pdata->buck4_gpiodvs) { - if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs) { - dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n"); - ret = -EINVAL; - return ret; - } - } - s5m_reg_update(s5m8767->iodev, S5M8767_REG_BUCK2CTRL, (pdata->buck2_gpiodvs) ? (1 << 1) : (0 << 1), 1 << 1); s5m_reg_update(s5m8767->iodev, S5M8767_REG_BUCK3CTRL,