From patchwork Sun May 1 10:36:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 8988571 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3ECBABF440 for ; Sun, 1 May 2016 10:41:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76C20202A1 for ; Sun, 1 May 2016 10:41:06 +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 AE320202BE for ; Sun, 1 May 2016 10:41:05 +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 1awomU-000880-DM; Sun, 01 May 2016 10:39:18 +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-00080R-Aj for linux-arm-kernel@lists.infradead.org; Sun, 01 May 2016 10:38:51 +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 u41AbfDn016707; Sun, 1 May 2016 19:38:02 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u41AbfDn016707 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1462099083; bh=wL4CcTpBMz1gP7mqaqGwUGYXny1rmsDUZPJTUXBzJVA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hhkNz2dd2slAF2pO5uhOVDcYziwVZXM3EMhf6Pdc/PA56Cl/9UO5jZNiDrH0bIypx KkvqT8M1OAFUcxXvMQokFJXH1p7ZyhmpR/26lvUGoS6QVYrDB2mzqC8+Us+cVOa4VX X12n2Q0Yy/BlcAwzy/JNbMesNJmp47ocdRVHqGGuEUqcKMRkJxAJGeNSqfxOeaP+sf cqlEXmw373SzNctkid3rnRSnhRlXDkgi7BzxB/yQFzkOKcKNStBPfcmHZmZdzX0k9r yQ5AXJMAV0Or6lIueLdDHP5SCm93rzPttz+aVwrx0G/nAdOtMY3ZaMuNnFRwzJLYn+ oEr9XG8QvslvQ== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: Philipp Zabel Subject: [PATCH 2/7] reset: ath79: use devm_reset_controller_register() Date: Sun, 1 May 2016 19:36:58 +0900 Message-Id: <1462099023-11819-3-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_787012_A8931187 X-CRM114-Status: UNSURE ( 9.04 ) 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 , 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 --- drivers/reset/reset-ath79.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/reset/reset-ath79.c b/drivers/reset/reset-ath79.c index ccb940a..16d410c 100644 --- a/drivers/reset/reset-ath79.c +++ b/drivers/reset/reset-ath79.c @@ -112,7 +112,7 @@ static int ath79_reset_probe(struct platform_device *pdev) ath79_reset->rcdev.of_reset_n_cells = 1; ath79_reset->rcdev.nr_resets = 32; - err = reset_controller_register(&ath79_reset->rcdev); + err = devm_reset_controller_register(&pdev->dev, &ath79_reset->rcdev); if (err) return err; @@ -131,7 +131,6 @@ static int ath79_reset_remove(struct platform_device *pdev) struct ath79_reset *ath79_reset = platform_get_drvdata(pdev); unregister_restart_handler(&ath79_reset->restart_nb); - reset_controller_unregister(&ath79_reset->rcdev); return 0; }