Re: [PATCH 3/6] regulator: fixed: use devm_regulator_register()
On Tuesday, December 10, 2013 2:45 AM, Mark Brown wrote: > On Fri, Dec 06, 2013 at 04:09:29PM +0900, Jingoo Han wrote: > > Use devm_regulator_register() to make cleanup paths simpler. > > This has the same issue as the gpio regulator - it needs a more complete > conversion to devm to be safe due to the use of other resources by the > regulator while it's running. The conversion looks straightfoward > though. OK, I see. Please ignore this patch. Thank you for your comment. Best regards, Jingoo Han -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/6] regulator: fixed: use devm_regulator_register()
On Fri, Dec 06, 2013 at 04:09:29PM +0900, Jingoo Han wrote: > Use devm_regulator_register() to make cleanup paths simpler. This has the same issue as the gpio regulator - it needs a more complete conversion to devm to be safe due to the use of other resources by the regulator while it's running. The conversion looks straightfoward though. signature.asc Description: Digital signature
Re: [PATCH 3/6] regulator: fixed: use devm_regulator_register()
On Fri, Dec 06, 2013 at 04:09:29PM +0900, Jingoo Han wrote: Use devm_regulator_register() to make cleanup paths simpler. This has the same issue as the gpio regulator - it needs a more complete conversion to devm to be safe due to the use of other resources by the regulator while it's running. The conversion looks straightfoward though. signature.asc Description: Digital signature
Re: [PATCH 3/6] regulator: fixed: use devm_regulator_register()
On Tuesday, December 10, 2013 2:45 AM, Mark Brown wrote: On Fri, Dec 06, 2013 at 04:09:29PM +0900, Jingoo Han wrote: Use devm_regulator_register() to make cleanup paths simpler. This has the same issue as the gpio regulator - it needs a more complete conversion to devm to be safe due to the use of other resources by the regulator while it's running. The conversion looks straightfoward though. OK, I see. Please ignore this patch. Thank you for your comment. Best regards, Jingoo Han -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/6] regulator: fixed: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han --- drivers/regulator/fixed.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index 5ea64b9..f45cc1ac 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -186,7 +186,8 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) cfg.driver_data = drvdata; cfg.of_node = pdev->dev.of_node; - drvdata->dev = regulator_register(>desc, ); + drvdata->dev = devm_regulator_register(>dev, >desc, + ); if (IS_ERR(drvdata->dev)) { ret = PTR_ERR(drvdata->dev); dev_err(>dev, "Failed to register regulator: %d\n", ret); @@ -212,7 +213,6 @@ static int reg_fixed_voltage_remove(struct platform_device *pdev) { struct fixed_voltage_data *drvdata = platform_get_drvdata(pdev); - regulator_unregister(drvdata->dev); kfree(drvdata->desc.supply_name); kfree(drvdata->desc.name); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/6] regulator: fixed: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han jg1@samsung.com --- drivers/regulator/fixed.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index 5ea64b9..f45cc1ac 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -186,7 +186,8 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) cfg.driver_data = drvdata; cfg.of_node = pdev-dev.of_node; - drvdata-dev = regulator_register(drvdata-desc, cfg); + drvdata-dev = devm_regulator_register(pdev-dev, drvdata-desc, + cfg); if (IS_ERR(drvdata-dev)) { ret = PTR_ERR(drvdata-dev); dev_err(pdev-dev, Failed to register regulator: %d\n, ret); @@ -212,7 +213,6 @@ static int reg_fixed_voltage_remove(struct platform_device *pdev) { struct fixed_voltage_data *drvdata = platform_get_drvdata(pdev); - regulator_unregister(drvdata-dev); kfree(drvdata-desc.supply_name); kfree(drvdata-desc.name); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/