From patchwork Wed Jul 19 07:18:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 13318438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EF48DC0015E for ; Wed, 19 Jul 2023 07:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ZFxklBnynCL0ETCDVMbO81UpOsClMcjnl7yrvUvcCNY=; b=cVrZnv9DLCtKek FC19lnW/7sOe/GcuvpUymkbYQLbXOs8yy9khRiJqtUAJjdKFKZbLHVLHZmilPKeSTrNeuA4EuyMVo raDFoKaZ+S2RgJezpXC6NojrSvUQl5tpl6Tis7teeFW9ysOUnWfzzI+zTCTCdPlWu3O2IIBZ08076 Ugr6bkFQm8jcypSFgadRnZqMMYR5IHcaYcirJrTTkBEbLaK8Tb3yv0WKupUfwyX2RphMGD3fx19Rf Dp+59dE8YxcLrjtvBjiv1D9xUyhiSFomw91cprXuWbaFqMLC54VZxSm3hp0iCP+/lL9Flt4qZKqmL pmbIbcDv5EXVbuIbZKXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qM1Tt-0064Un-2i; Wed, 19 Jul 2023 07:20:17 +0000 Received: from viti.kaiser.cx ([2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qM1Tq-0064Sv-2y for linux-arm-kernel@lists.infradead.org; Wed, 19 Jul 2023 07:20:16 +0000 Received: from ipservice-092-217-093-053.092.217.pools.vodafone-ip.de ([92.217.93.53] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1qM1Th-0008I7-FB; Wed, 19 Jul 2023 09:20:05 +0200 From: Martin Kaiser To: Herbert Xu Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 0/4] hwrng: cctrng - simplify the code a bit Date: Wed, 19 Jul 2023 09:18:02 +0200 Message-Id: <20230719071806.335718-1-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230719_002015_126669_6C98A880 X-CRM114-Status: UNSURE ( 7.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We can use module_platform_driver and devm_clk_get_optional_enabled in the cctrng driver to make its code simpler. The patches were compile tested only. Martin Kaiser (4): hwrng: cctrng - don't open code init and exit functions hwrng: cctrng - let devres enable the clock hwrng: cctrng - merge cc_trng_clk_init into its only caller hwrng: cctrng - use dev_err_probe in error paths drivers/char/hw_random/cctrng.c | 93 +++++++-------------------------- 1 file changed, 19 insertions(+), 74 deletions(-)