From: Mark Brown Date: Sat, 31 Aug 2013 10:57:16 +0000 (+0100) Subject: regulator: s2mps11: Convert to devm_regulator_register() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b707a274455f8f80feab24b999dad9e649c98c9c;p=linux-beck.git regulator: s2mps11: Convert to devm_regulator_register() Signed-off-by: Mark Brown Acked-by: Sangbeom Kim --- diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 5eba2ff8c0e8..d7c241e1a173 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -453,27 +453,10 @@ common_reg: ret = PTR_ERR(s2mps11->rdev[i]); dev_err(&pdev->dev, "regulator init failed for %d\n", i); - s2mps11->rdev[i] = NULL; - goto err; + return ret; } } - return 0; -err: - for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) - regulator_unregister(s2mps11->rdev[i]); - - return ret; -} - -static int s2mps11_pmic_remove(struct platform_device *pdev) -{ - struct s2mps11_info *s2mps11 = platform_get_drvdata(pdev); - int i; - - for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) - regulator_unregister(s2mps11->rdev[i]); - return 0; } @@ -489,7 +472,6 @@ static struct platform_driver s2mps11_pmic_driver = { .owner = THIS_MODULE, }, .probe = s2mps11_pmic_probe, - .remove = s2mps11_pmic_remove, .id_table = s2mps11_pmic_id, };