Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35842781rwd; Mon, 10 Jul 2023 13:33:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlHFry4TMECInInizp0u47DshjZUXgB5JSjrZQ/p1NwC3vPT915eDgOdQT/nPTMVXhgxzJB/ X-Received: by 2002:a05:651c:97:b0:2b6:d2c5:4d54 with SMTP id 23-20020a05651c009700b002b6d2c54d54mr12089138ljq.18.1689021216323; Mon, 10 Jul 2023 13:33:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689021216; cv=none; d=google.com; s=arc-20160816; b=JGIHg/TjT9FlweVZU0/d3DiRoTqXuC6+JWo7UT6f5v8tTHyOt0cpQ0vVU2OrEXAxzF 6wPbezQJdhMh7+JWze5c5F3KiulVbVZoyDj4+Av0rVplBjZ+joAjuY90i9B8+YDspA8I smyDtBUtTukoXLEdAm2NimxmDmIclqgB2mBe6vcWKvXkR/TH2dZNwP/ZUucO8QMREuq/ LOQxQxxxRGn5z5/+PimZtjZ6aDLHg9sZqd/DG10Ehg4HUjERfuM9wB5w60R+zFo+54T2 iuq+KRV7TGUJYWE9wBLOZoRAQ7r9lbSgFSLpGa9Y0YW4MjAR2AHVhB5987tTz/MhfIfC myuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+61od0lHF7CJexf1UWouz4zaPYP+292aupA0UhNVxwI=; fh=GUQwZ7uCW3sOebrGSFJwPRX8di32vmIzxh/oFyyWwpA=; b=NOvXkgQuFLCr4Uyw2br2j+NktTzdq90VQQW6kUK6x+YDXtPNuSEvuUJCDSRNvsAMla qqCO2eLX1wPKqx3BPcFC4F5cVwI5T1mhRPoCTq07WJq3K255y6Y/8z1itNdYXBcLT3bU ErSZsdHo2FedKNHKF+7hQQDqAGkUHseZHuehFGck6jZ/aTjQ+1ka7G/FRS3UQpNHuP2J x+EkYq8rlGa7SuetWPI3F0ZEHcbRsXZtSs17GTPGgcJKMB7MMoV6FK3KYVWCDD/zKr+4 /1o4+e8KpJLJnazGAw8Ve77DqmY0Ce24G6GK1OJPJDYU433ocEoXhXkuWZNFTHILZuRP TYbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l2-20020a170906414200b0096f4deef5basi387881ejk.649.2023.07.10.13.33.07; Mon, 10 Jul 2023 13:33:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232159AbjGJU3g (ORCPT + 99 others); Mon, 10 Jul 2023 16:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231673AbjGJU3d (ORCPT ); Mon, 10 Jul 2023 16:29:33 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 026C5198; Mon, 10 Jul 2023 13:29:27 -0700 (PDT) Received: from 250.57.4.146.static.wline.lns.sme.cust.swisscom.ch ([146.4.57.250] 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 1qIxVZ-0002mg-Ni; Mon, 10 Jul 2023 22:29:21 +0200 From: Martin Kaiser To: Herbert Xu Cc: aric.pzqi@ingenic.com, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: hwrng: ingenic: simplify the code Date: Mon, 10 Jul 2023 22:27:26 +0200 Message-Id: <20230710202733.116133-1-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Simplify the ingenic-trng driver a bit. Switch to devm_clk_get_enabled and devm_hwrng_register. Remove some unused code. The changes were compile-tested only (I don't have this hardware). Martin Kaiser (7): hwrng: ingenic - enable compile testing hwrng: ingenic - remove two unused defines hwrng: ingenic - remove dead assignments hwrng: ingenic - use devm_clk_get_enabled hwrng: ingenic - use dev_err_probe in error paths hwrng: ingenic - don't disable the rng in ingenic_trng_remove hwrng: ingenic - switch to device managed registration drivers/char/hw_random/Kconfig | 3 +- drivers/char/hw_random/ingenic-trng.c | 57 ++++++--------------------- 2 files changed, 12 insertions(+), 48 deletions(-) -- 2.30.2