From patchwork Fri May 20 12:21:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9129379 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A6AD660467 for ; Fri, 20 May 2016 12:23:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97315200E7 for ; Fri, 20 May 2016 12:23:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C02B27BF1; Fri, 20 May 2016 12:23:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 2466C200E7 for ; Fri, 20 May 2016 12:23:37 +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 1b3jRb-0005Ho-VO; Fri, 20 May 2016 12:22:19 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b3jRY-0005F7-Fw for linux-arm-kernel@bombadil.infradead.org; Fri, 20 May 2016 12:22:16 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by merlin.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1b3jRW-0002BW-MK for linux-arm-kernel@lists.infradead.org; Fri, 20 May 2016 12:22:15 +0000 Received: by mail-wm0-x235.google.com with SMTP id n129so269477918wmn.1 for ; Fri, 20 May 2016 05:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=AUNoUTArxQJnhse2nNeARthqz3JeK8XrBX8ZO6wEEII=; b=TkC/FNmIrWlEU0HcXVXg3FwCfpSENkI61lv/EcAzj1HXXnZ5RxXOrDmJynH2V8dNdp n5uJbewlqxdQVDQ3coyaRXMwdJ75eMjy/SfTXZQIOAblcegmcbqnYGQrVwIdWkRxvXIz pvsh0QAov2wSiJoDB7r+G/eSi+WE1nbo7rL2YkRwBFPDehDxyNrV7I48v/mtDKAHQk9C 3+K6T4m5fBfSp6weMmuj2nfpMlgm622L63Mn1mX75brtVwzizmC6SPCyiAS6yPHaVO5K nUuvcNAXKmaKksPmErgfAsHNz1ybsosxMIKNAjFa9UAicy5leZp2KSPfeuDOs5ri4bz/ diUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AUNoUTArxQJnhse2nNeARthqz3JeK8XrBX8ZO6wEEII=; b=CrfWtBWgfw1hG/8gjMLD0m0yyXbVsgnWf1hclGgMJ89JaVS7cHQfVkK78ikwSwfDXt +4QnPevRt4XypgaCFxOZIHwW/kYUQomh6oXL1wzqxukPSL4wtbhX/rftu9jG0iOIa7CG WJOotgW278f4gzpbCOklIKE+nNl4/y7cWnRJGntgF+s4a6mVL6KY9MUuuvg9A754yCtK yELtdrQl0uGgQbhajM88UbriLw0W6+iivCJCwtj5pABz1lZixz30WnWl9zwP/Dzxe1u1 ybmCEcbf4CVJ1Yh5NfXFn7oqsbFW+zSvRMNZ+zort5h+XZ81f+/SONmvl2aFC2uFhfkv VExg== X-Gm-Message-State: AOPr4FW84Kd2mTK3XvZ9qeMHb9zwwAxGMwdk59FunlMaeGjlNV1s50n9ItIcl/nIakNsxtti X-Received: by 10.28.238.72 with SMTP id m69mr3312015wmh.4.1463746910958; Fri, 20 May 2016 05:21:50 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id d20sm4342618wmd.12.2016.05.20.05.21.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 May 2016 05:21:50 -0700 (PDT) From: Neil Armstrong To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, p.zabel@pengutronix.de Subject: [PATCH] reset: oxnas: Use devm register API and get rid of platform remove Date: Fri, 20 May 2016 14:21:37 +0200 Message-Id: <1463746897-24813-1-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160520_082214_860412_0827BDAC X-CRM114-Status: GOOD ( 13.46 ) 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: Neil Armstrong MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use the brand new devm_reset_controller_register() API to get rid of the platform driver remove callback. Signed-off-by: Neil Armstrong --- drivers/reset/reset-oxnas.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) Hi Philip, This patch is based on your reset/next tree after the new devm_reset_controller_register() was merged. I hope it could be merged for 4.7. Thanks, Neil diff --git a/drivers/reset/reset-oxnas.c b/drivers/reset/reset-oxnas.c index c60fb2d..9449805 100644 --- a/drivers/reset/reset-oxnas.c +++ b/drivers/reset/reset-oxnas.c @@ -112,21 +112,11 @@ static int oxnas_reset_probe(struct platform_device *pdev) data->rcdev.ops = &oxnas_reset_ops; data->rcdev.of_node = pdev->dev.of_node; - return reset_controller_register(&data->rcdev); -} - -static int oxnas_reset_remove(struct platform_device *pdev) -{ - struct oxnas_reset *data = platform_get_drvdata(pdev); - - reset_controller_unregister(&data->rcdev); - - return 0; + return devm_reset_controller_register(&pdev->dev, &data->rcdev); } static struct platform_driver oxnas_reset_driver = { .probe = oxnas_reset_probe, - .remove = oxnas_reset_remove, .driver = { .name = "oxnas-reset", .of_match_table = oxnas_reset_dt_ids,