From patchwork Sun May 1 10:37:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 8988581 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 7577B9F1D3 for ; Sun, 1 May 2016 10:41:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA934202BE for ; Sun, 1 May 2016 10:41:07 +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 CFA08202AE for ; Sun, 1 May 2016 10:41:06 +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 1awomH-00085V-HC; Sun, 01 May 2016 10:39:05 +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-00080Q-Af 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 u41AbfDp016707; Sun, 1 May 2016 19:38:04 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u41AbfDp016707 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1462099084; bh=GSvDkmlB3CVRYgosay2xxkJTjv8x4aXoGIs288/JFaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NfQ3aF8NKlGOb+bEpgZCOFk1loyCCwfGAvYFs4xZ5Wn1pZjbNUnqzUAEZL27Hhiqf DpovQShR5JHY0bsiW3JFLxkCRMgSuKaEPElBiuh9aZZ2kKdSDjq+Ev3rHxaWSdt/W4 2MSJT7qYtbyC9vwLaIL0sAD5NfUFIKX2WhO1ZSSvx7NHqlTVpNi4Gu8PPNNCtw8+YK 6+r9dHP7VWOYVAO7/xya/MSLMC92XL/1D84bGT5j8+9UojKVcXYu5fKrh9NSa3WJNS r6Ijkh4/IWCIaRTiEYgpG63s57V1u0/u9AZwek1quoBrIxTAKzm8SJ4/w9o8leKpeb sQEunCayM4/Dg== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: Philipp Zabel Subject: [PATCH 4/7] reset: pistachio: use devm_reset_controller_register() Date: Sun, 1 May 2016 19:37:00 +0900 Message-Id: <1462099023-11819-5-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_823201_F8621C44 X-CRM114-Status: UNSURE ( 9.67 ) 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 drop the .remove callback. Signed-off-by: Masahiro Yamada --- drivers/reset/reset-pistachio.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/reset/reset-pistachio.c b/drivers/reset/reset-pistachio.c index 72a97a1..bbc4c06 100644 --- a/drivers/reset/reset-pistachio.c +++ b/drivers/reset/reset-pistachio.c @@ -121,16 +121,7 @@ static int pistachio_reset_probe(struct platform_device *pdev) rd->rcdev.ops = &pistachio_reset_ops; rd->rcdev.of_node = np; - return reset_controller_register(&rd->rcdev); -} - -static int pistachio_reset_remove(struct platform_device *pdev) -{ - struct pistachio_reset_data *data = platform_get_drvdata(pdev); - - reset_controller_unregister(&data->rcdev); - - return 0; + return devm_reset_controller_register(dev, &rd->rcdev); } static const struct of_device_id pistachio_reset_dt_ids[] = { @@ -141,7 +132,6 @@ MODULE_DEVICE_TABLE(of, pistachio_reset_dt_ids); static struct platform_driver pistachio_reset_driver = { .probe = pistachio_reset_probe, - .remove = pistachio_reset_remove, .driver = { .name = "pistachio-reset", .of_match_table = pistachio_reset_dt_ids,