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: 66986 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp568919qge; Sun, 1 May 2016 03:39:52 -0700 (PDT) X-Received: by 10.98.22.129 with SMTP id 123mr43239238pfw.74.1462099192227; Sun, 01 May 2016 03:39:52 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m76si16825760pfi.178.2016.05.01.03.39.51; Sun, 01 May 2016 03:39:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752546AbcEAKjZ (ORCPT + 29 others); Sun, 1 May 2016 06:39:25 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:22225 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752425AbcEAKjW (ORCPT ); Sun, 1 May 2016 06:39:22 -0400 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 Cc: linux-arm-kernel@lists.infradead.org, Masahiro Yamada , Joachim Eastwood , linux-kernel@vger.kernel.org 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_reset_controller_register() for the reset controller registration and remove the unregister call from the .remove callback. Signed-off-by: Masahiro Yamada --- drivers/reset/reset-lpc18xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.9.1 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);