From patchwork Sun May 1 10:36:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 8988551 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7FCAA9F1D3 for ; Sun, 1 May 2016 10:41:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9CF75202BE for ; Sun, 1 May 2016 10:41:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C878C20295 for ; Sun, 1 May 2016 10:41:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1awomA-00084v-SP; Sun, 01 May 2016 10:38:58 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1awom1-00080T-Ad for linux-arm-kernel@lists.infradead.org; Sun, 01 May 2016 10:38:50 +0000 Received: from grover.sesame (FL1-119-242-215-193.osk.mesh.ad.jp [119.242.215.193]) (authenticated) by conuserg-07.nifty.com with ESMTP id u41AbfDo016707; Sun, 1 May 2016 19:38:03 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u41AbfDo016707 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1462099084; bh=IJkvp2qrG/m0/HgRcdOsfaGNK01LP/Tv0Tt21dsFb7g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uqnC5p7LD+h7yYAVGKNeLqCWxC7Sgf8CiZfcc76HGeFBf56aEKrqzvd26+1ZaLXwF lON0judueCrZqdh7Kxr7r/TocP+X/gXJcyO7bIeJ4i5+UrTGR1PsocjAVDot4EyCxi kk6Y4+rccjjKnQ7u9j/XrYKwL0iSh0BICSiBHdx3JG+//LnSg+n1LfpNn74G2L6shD LjfqDL4hG4fP5MAaRGCr6Fj/SJ+6mCOxZvaf0Emfi9znU3v0EnY6fFOJuUaBwGo4pZ 5gpiOG/GVA5iAG0kJ8PXeDGYhqMO4Ckm7Q37GhJhXtSaSqJi5PSvMRnrfxCVU5DUAt Cr9m58BR6Mk9g== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: Philipp Zabel Subject: [PATCH 3/7] reset: lpc18xx: use devm_reset_controller_register() Date: Sun, 1 May 2016 19:36:59 +0900 Message-Id: <1462099023-11819-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1462099023-11819-1-git-send-email-yamada.masahiro@socionext.com> References: <1462099023-11819-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160501_033849_780833_C8B237AE X-CRM114-Status: UNSURE ( 7.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.2 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Masahiro Yamada , Joachim Eastwood , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use devm_reset_controller_register() for the reset controller registration and remove the unregister call from the .remove callback. Signed-off-by: Masahiro Yamada Acked-by: Joachim Eastwood --- drivers/reset/reset-lpc18xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/reset/reset-lpc18xx.c b/drivers/reset/reset-lpc18xx.c index 3b8a4f5..dd4f27e 100644 --- a/drivers/reset/reset-lpc18xx.c +++ b/drivers/reset/reset-lpc18xx.c @@ -199,7 +199,7 @@ static int lpc18xx_rgu_probe(struct platform_device *pdev) platform_set_drvdata(pdev, rc); - ret = reset_controller_register(&rc->rcdev); + ret = devm_reset_controller_register(&pdev->dev, &rc->rcdev); if (ret) { dev_err(&pdev->dev, "unable to register device\n"); goto dis_clks; @@ -229,8 +229,6 @@ static int lpc18xx_rgu_remove(struct platform_device *pdev) if (ret) dev_warn(&pdev->dev, "failed to unregister restart handler\n"); - reset_controller_unregister(&rc->rcdev); - clk_disable_unprepare(rc->clk_delay); clk_disable_unprepare(rc->clk_reg);