aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorKim, Milo <Milo.Kim@ti.com>2013-01-03 01:32:26 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-03 06:28:53 -0500
commitf02a3917b3bc65149cc077396896f2ae5a2fbe4a (patch)
treed98d3d0c2515d9cbb07bfd9e04c6446f00ae2eef /drivers/regulator
parent939e88f0909a4dd76cf75b9bda6ee905c04a162f (diff)
lp8788-ldo: fix a parent device on devm_gpio_request()
Use 'platform_device' rather than i2c client device node. Argument is added in lp8788_config_ldo_enable_mode(). Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/lp8788-ldo.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/regulator/lp8788-ldo.c b/drivers/regulator/lp8788-ldo.c
index 40403e9f83b6..416bb6088ab5 100644
--- a/drivers/regulator/lp8788-ldo.c
+++ b/drivers/regulator/lp8788-ldo.c
@@ -616,10 +616,11 @@ static struct regulator_desc lp8788_aldo_desc[] = {
616 }, 616 },
617}; 617};
618 618
619static int lp8788_gpio_request_ldo_en(struct lp8788_ldo *ldo, 619static int lp8788_gpio_request_ldo_en(struct platform_device *pdev,
620 struct lp8788_ldo *ldo,
620 enum lp8788_ext_ldo_en_id id) 621 enum lp8788_ext_ldo_en_id id)
621{ 622{
622 struct device *dev = ldo->lp->dev; 623 struct device *dev = &pdev->dev;
623 struct lp8788_ldo_enable_pin *pin = ldo->en_pin; 624 struct lp8788_ldo_enable_pin *pin = ldo->en_pin;
624 int ret, gpio, pinstate; 625 int ret, gpio, pinstate;
625 char *name[] = { 626 char *name[] = {
@@ -647,7 +648,8 @@ static int lp8788_gpio_request_ldo_en(struct lp8788_ldo *ldo,
647 return ret; 648 return ret;
648} 649}
649 650
650static int lp8788_config_ldo_enable_mode(struct lp8788_ldo *ldo, 651static int lp8788_config_ldo_enable_mode(struct platform_device *pdev,
652 struct lp8788_ldo *ldo,
651 enum lp8788_ldo_id id) 653 enum lp8788_ldo_id id)
652{ 654{
653 int ret; 655 int ret;
@@ -693,7 +695,7 @@ static int lp8788_config_ldo_enable_mode(struct lp8788_ldo *ldo,
693 695
694 ldo->en_pin = pdata->ldo_pin[enable_id]; 696 ldo->en_pin = pdata->ldo_pin[enable_id];
695 697
696 ret = lp8788_gpio_request_ldo_en(ldo, enable_id); 698 ret = lp8788_gpio_request_ldo_en(pdev, ldo, enable_id);
697 if (ret) 699 if (ret)
698 goto set_default_ldo_enable_mode; 700 goto set_default_ldo_enable_mode;
699 701
@@ -717,7 +719,7 @@ static int lp8788_dldo_probe(struct platform_device *pdev)
717 return -ENOMEM; 719 return -ENOMEM;
718 720
719 ldo->lp = lp; 721 ldo->lp = lp;
720 ret = lp8788_config_ldo_enable_mode(ldo, lp8788_dldo_id[id]); 722 ret = lp8788_config_ldo_enable_mode(pdev, ldo, lp8788_dldo_id[id]);
721 if (ret) 723 if (ret)
722 return ret; 724 return ret;
723 725
@@ -773,7 +775,7 @@ static int lp8788_aldo_probe(struct platform_device *pdev)
773 return -ENOMEM; 775 return -ENOMEM;
774 776
775 ldo->lp = lp; 777 ldo->lp = lp;
776 ret = lp8788_config_ldo_enable_mode(ldo, lp8788_aldo_id[id]); 778 ret = lp8788_config_ldo_enable_mode(pdev, ldo, lp8788_aldo_id[id]);
777 if (ret) 779 if (ret)
778 return ret; 780 return ret;
779 781