Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp312863ybl; Tue, 28 Jan 2020 03:44:16 -0800 (PST) X-Google-Smtp-Source: APXvYqyv26DgRlBoCD8ElP6NhGisPYFT8BXPJqKmciRoEUlbeQXSAj7wjtAeRtlXIwDf/+D1/8v2 X-Received: by 2002:aca:3f54:: with SMTP id m81mr2409254oia.73.1580211856785; Tue, 28 Jan 2020 03:44:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580211856; cv=none; d=google.com; s=arc-20160816; b=jtleKC4KQduF4mZi+Q2gJQQLHpn4vcTA6VXv+YUMBvvX3ITI54OE1TF6DnBtsWxNvv hX6oIw2Lzt/ZTtSpTgFaL8Zi8krZ9fWpDbqxqQ7oUu/iBe0YcW0CStrKc2nHVO+F/JMV tcSVm94bpPxZ1xtl4nny/NQvX10OuIx8HYTJ2fJJiM6yW69ypN723CPiC1ub/SgJyOaO iGFGFSbuVN2NdLMo55fzjt8uShAdYxYZpP2epdkwp7ibyuuEqyr2m1Bx0alg5Xz5niHI HvI9v7APQsKdlLDkFbWMYifyD/gcZ+wXlVGYEKSKtJQ7unUI0YHFNS422//1XUmUVeFB gIZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZdCecFhPcb/N8UEsbYJePCObSqE1Ep6Gt3HW7fUsfQo=; b=eJIEI/x69BYtzn+hFzVwGoWA94u6li864PndfDOEHAVFrQ362McYg7+vdHg8WSL414 +6Iebb/jAAL0GjpH8Jy9GAxsHhwHlG2PhpFnwRMN2td5yxsnLjz0csJ9VE+0PmT4FuXE Bnotcpm/7R+L4/ZakqwgifNaEEUiaGMOzgoCF62vV7+XzNQ5BJzKKkpLagxN5v5tgGJk F+PJU94yiCIuoqGfjfeLoHwbt10WzMaEY1tr5rAoiR7kXN3i2Ab99BJ59TjChKpf6TFr jW2Rr8PKuktoICVJgFrVpzTRK7eS1TApyqlK5oiLgtAV0RkNhnA2TM6cCQcPSEl3or67 GKbQ== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t82si4574118oif.45.2020.01.28.03.44.05; Tue, 28 Jan 2020 03:44:16 -0800 (PST) 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; 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 S1726108AbgA1LnN (ORCPT + 99 others); Tue, 28 Jan 2020 06:43:13 -0500 Received: from viti.kaiser.cx ([85.214.81.225]:38960 "EHLO viti.kaiser.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725903AbgA1LnM (ORCPT ); Tue, 28 Jan 2020 06:43:12 -0500 Received: from dslb-088-068-095-017.088.068.pools.vodafone-ip.de ([88.68.95.17] helo=martin-debian-1.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iwOch-0008Dy-DF; Tue, 28 Jan 2020 12:01:35 +0100 From: Martin Kaiser To: Herbert Xu , PrasannaKumar Muralidharan , NXP Linux Team Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 3/6] hwrng: imx-rngc - use devres for registration Date: Tue, 28 Jan 2020 12:00:59 +0100 Message-Id: <20200128110102.11522-4-martin@kaiser.cx> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200128110102.11522-1-martin@kaiser.cx> References: <20200128110102.11522-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devres to register the rngc with the hwrng core. Drop the explicit deregistration. Signed-off-by: Martin Kaiser --- drivers/char/hw_random/imx-rngc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c index 903894518c8d..1381ddd5b891 100644 --- a/drivers/char/hw_random/imx-rngc.c +++ b/drivers/char/hw_random/imx-rngc.c @@ -263,7 +263,7 @@ static int imx_rngc_probe(struct platform_device *pdev) } } - ret = hwrng_register(&rngc->rng); + ret = devm_hwrng_register(&pdev->dev, &rngc->rng); if (ret) { dev_err(&pdev->dev, "FSL RNGC registering failed (%d)\n", ret); goto err; @@ -282,8 +282,6 @@ static int __exit imx_rngc_remove(struct platform_device *pdev) { struct imx_rngc *rngc = platform_get_drvdata(pdev); - hwrng_unregister(&rngc->rng); - clk_disable_unprepare(rngc->clk); return 0; -- 2.20.1