Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756103Ab3IZHyA (ORCPT ); Thu, 26 Sep 2013 03:54:00 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:57221 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754688Ab3IZHx7 (ORCPT ); Thu, 26 Sep 2013 03:53:59 -0400 X-AuditID: cbfee68d-b7fe86d0000077a5-04-5243e816f1fe From: Jingoo Han To: "'Mark Brown'" Cc: "'Liam Girdwood'" , linux-kernel@vger.kernel.org, "'Jingoo Han'" , "'Balaji T K'" , "'Nishanth Menon'" References: <003101ceba8c$88d6a840$9a83f8c0$%han@samsung.com> In-reply-to: <003101ceba8c$88d6a840$9a83f8c0$%han@samsung.com> Subject: [PATCH V3 13/14] regulator: twl: use devm_regulator_register() Date: Thu, 26 Sep 2013 16:53:57 +0900 Message-id: <003d01ceba8d$8e35d210$aaa17630$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac66jIjCzH3ID+v5Qym5l1DxbvczrwAAPKOg Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFIsWRmVeSWpSXmKPExsVy+t8zA12xF85BBkv+8VhMnbydzWLqwyds FpcXXmK1+Halg8ni8q45bBZvfpxlcmDz2DnrLrvHplWdbB59W1Yxehy/sZ3J4/MmuQDWKC6b lNSczLLUIn27BK6Mrv3SBRc5Kr5332NuYFzG3sXIySEhYCLRfXIDG4QtJnHh3nogm4tDSGAZ o8S0v9fYYIqmnVnHDpGYzihxaNo5sISQwC9GiVufjUBsNgE1iS9fDgMVcXCICKhK/H/lDhJm FljLKDGn2xui3Fai8dtfFhCbU8BOYtb+k8wgtrCAu8TMW2cZQWwWoNbtM7pZQWxeoPrlh39B 2YISPybfY4GYqSWxfudxJghbXmLzmrfMIGslBNQlHv3VBQmLCBhJNO35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WlOavEh xmSgRycyS4km5wMTVV5JvKGxiZmRpZGZhZGJuTlpwkrivAdbrQOFBNITS1KzU1MLUotgtjBx cEo1MLJWZtWaz+LaqT/X8biAMmd4eIpc1NPlOjklGrp/7ee3dzxbn9LidEuckbt1wemHs/j1 dvMzn52/0umN/caVO0409YfeTlsS3TFJzon1kbne64UiwuqcTl3M/9vv6n/+eenUuuW3Xu7O UzT9XreVI/V+xYlFt5Q4L/jqbWcv7YqeyKYp5PHutxJLcUaioRZzUXEiAFseB3ZKAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1317 Lines: 38 Use devm_regulator_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han Acked-by: Nishanth Menon --- drivers/regulator/twl-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 78aae4c..8ebd785 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -1188,7 +1188,7 @@ static int twlreg_probe(struct platform_device *pdev) config.driver_data = info; config.of_node = pdev->dev.of_node; - rdev = regulator_register(&info->desc, &config); + rdev = devm_regulator_register(&pdev->dev, &info->desc, &config); if (IS_ERR(rdev)) { dev_err(&pdev->dev, "can't register %s, %ld\n", info->desc.name, PTR_ERR(rdev)); @@ -1217,7 +1217,6 @@ static int twlreg_remove(struct platform_device *pdev) struct regulator_dev *rdev = platform_get_drvdata(pdev); struct twlreg_info *info = rdev->reg_data; - regulator_unregister(rdev); kfree(info); return 0; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/