diff options
author | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
commit | 62b8c978ee6b8d135d9e7953221de58000dba986 (patch) | |
tree | 683b04b2e627f6710c22c151b23c8cc9a165315e /drivers/regulator/tps6105x-regulator.c | |
parent | 78fd82238d0e5716578c326404184a27ba67fd6e (diff) | |
download | linux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz |
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'drivers/regulator/tps6105x-regulator.c')
-rw-r--r-- | drivers/regulator/tps6105x-regulator.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/regulator/tps6105x-regulator.c b/drivers/regulator/tps6105x-regulator.c index c1e33a3..ec9453f 100644 --- a/drivers/regulator/tps6105x-regulator.c +++ b/drivers/regulator/tps6105x-regulator.c @@ -137,7 +137,7 @@ static int tps6105x_regulator_probe(struct platform_device *pdev) /* This instance is not set for regulator mode so bail out */ if (pdata->mode != TPS6105X_MODE_VOLTAGE) { dev_info(&pdev->dev, - "chip not in voltage mode mode, exit probe\n"); + "chip not in voltage mode mode, exit probe \n"); return 0; } @@ -146,9 +146,8 @@ static int tps6105x_regulator_probe(struct platform_device *pdev) config.driver_data = tps6105x; /* Register regulator with framework */ - tps6105x->regulator = devm_regulator_register(&pdev->dev, - &tps6105x_regulator_desc, - &config); + tps6105x->regulator = regulator_register(&tps6105x_regulator_desc, + &config); if (IS_ERR(tps6105x->regulator)) { ret = PTR_ERR(tps6105x->regulator); dev_err(&tps6105x->client->dev, @@ -160,12 +159,20 @@ static int tps6105x_regulator_probe(struct platform_device *pdev) return 0; } +static int tps6105x_regulator_remove(struct platform_device *pdev) +{ + struct tps6105x *tps6105x = dev_get_platdata(&pdev->dev); + regulator_unregister(tps6105x->regulator); + return 0; +} + static struct platform_driver tps6105x_regulator_driver = { .driver = { .name = "tps6105x-regulator", .owner = THIS_MODULE, }, .probe = tps6105x_regulator_probe, + .remove = tps6105x_regulator_remove, }; static __init int tps6105x_regulator_init(void) |