]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/regulator/tps6105x-regulator.c
Merge tag 'efi-urgent' into x86/urgent
[karo-tx-linux.git] / drivers / regulator / tps6105x-regulator.c
index ec9453ffb77fd561ec1c2d6c3591b7302bc16b5f..c1e33a3d397b6a62b88fc14e8e2fc0c1ae6a8ec2 100644 (file)
@@ -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,8 +146,9 @@ static int tps6105x_regulator_probe(struct platform_device *pdev)
        config.driver_data = tps6105x;
 
        /* Register regulator with framework */
-       tps6105x->regulator = regulator_register(&tps6105x_regulator_desc,
-                                                &config);
+       tps6105x->regulator = devm_regulator_register(&pdev->dev,
+                                                     &tps6105x_regulator_desc,
+                                                     &config);
        if (IS_ERR(tps6105x->regulator)) {
                ret = PTR_ERR(tps6105x->regulator);
                dev_err(&tps6105x->client->dev,
@@ -159,20 +160,12 @@ 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)