Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965278AbeAJEC5 (ORCPT + 1 other); Tue, 9 Jan 2018 23:02:57 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:58482 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S965185AbeAJEC4 (ORCPT ); Tue, 9 Jan 2018 23:02:56 -0500 X-UUID: cb4eb766d1b748b893842399929b11a4-20180110 From: To: , , , , , CC: , , , , , Sean Wang Subject: [PATCH] hw_random: mediatek: Setup default RNG quality Date: Wed, 10 Jan 2018 12:02:46 +0800 Message-ID: <134f98ae3270cc6040121cf75d50c916adfe58dc.1515556571.git.sean.wang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Sean Wang When hw_random device's quality is non-zero, it will automatically fill the kernel's entropy pool at boot. For the purpose, one conservative quality value is being picked up as the default value. Signed-off-by: Sean Wang --- drivers/char/hw_random/mtk-rng.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/hw_random/mtk-rng.c b/drivers/char/hw_random/mtk-rng.c index 8da7bcf..7f99cd5 100644 --- a/drivers/char/hw_random/mtk-rng.c +++ b/drivers/char/hw_random/mtk-rng.c @@ -135,6 +135,7 @@ static int mtk_rng_probe(struct platform_device *pdev) #endif priv->rng.read = mtk_rng_read; priv->rng.priv = (unsigned long)&pdev->dev; + priv->rng.quality = 900; priv->clk = devm_clk_get(&pdev->dev, "rng"); if (IS_ERR(priv->clk)) { -- 2.7.4