From patchwork Fri May 1 14:37:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 6309691 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 46F45BEEE1 for ; Fri, 1 May 2015 14:37:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 652D520435 for ; Fri, 1 May 2015 14:37:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7391320439 for ; Fri, 1 May 2015 14:37:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753819AbbEAOh3 (ORCPT ); Fri, 1 May 2015 10:37:29 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:34549 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753623AbbEAOh2 (ORCPT ); Fri, 1 May 2015 10:37:28 -0400 Received: by wicmx19 with SMTP id mx19so33109412wic.1; Fri, 01 May 2015 07:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=N+LaQ+f0/x3xVQfAMa4MXA7FXuGZXtif/76uDm5Fdcs=; b=VWdSXo4XOM4VIy2GiQOqvJ1VktsiO01RD3pq1XMXl6gJhlXtmtVqRJd4VXA8EzwFy1 ub+f2fEVJvFfdTa3TnKTMR0w+KnMKmiQubDEMBsXp0l6D7XuI0KW0kBMa3xqiDfAg0d9 6AZdi4PBH8DVi3DyBMQPJnBiDXncVdcaYSWNjwBrjSKWCZapacO7GTtleAestq4YUmVn C2p6IvZWcp9j67zYC9kam0K/HGYDTtRASMcr519iZBH+9zu3dYMHfB+XnVzE02J0NHQ+ /MmXJd4NC1y90NOo2kHuNFiOpeKjO8ZcJLOJDzxQahIFqertPlhiUBTVcXyPN31F7084 ZTFw== X-Received: by 10.195.13.70 with SMTP id ew6mr18691668wjd.59.1430491047070; Fri, 01 May 2015 07:37:27 -0700 (PDT) Received: from skynet.lan (27.Red-88-6-108.staticIP.rima-tde.net. [88.6.108.27]) by mx.google.com with ESMTPSA id z12sm7853603wjq.12.2015.05.01.07.37.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 May 2015 07:37:26 -0700 (PDT) From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= To: herbert@gondor.apana.org.au, dmitry.torokhov@gmail.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, jogo@openwrt.org, f.fainelli@gmail.com, cernekee@gmail.com Cc: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Subject: [PATCH] hw_random: bcm63xx-rng: fix bugs introduced in commit 6229c16060fee9a015bf476f21e40c6f08609d6e. Date: Fri, 1 May 2015 16:37:21 +0200 Message-Id: <1430491041-24480-1-git-send-email-noltari@gmail.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP s/clk_didsable_unprepare/clk_disable_unprepare s/prov/priv s/error/ret in bcm63xx_rng_probe Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- drivers/char/hw_random/bcm63xx-rng.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/char/hw_random/bcm63xx-rng.c b/drivers/char/hw_random/bcm63xx-rng.c index d1494ec..4b31f13 100644 --- a/drivers/char/hw_random/bcm63xx-rng.c +++ b/drivers/char/hw_random/bcm63xx-rng.c @@ -57,7 +57,7 @@ static void bcm63xx_rng_cleanup(struct hwrng *rng) val &= ~RNG_EN; __raw_writel(val, priv->regs + RNG_CTRL); - clk_didsable_unprepare(prov->clk); + clk_disable_unprepare(priv->clk); } static int bcm63xx_rng_data_present(struct hwrng *rng, int wait) @@ -97,14 +97,14 @@ static int bcm63xx_rng_probe(struct platform_device *pdev) priv->rng.name = pdev->name; priv->rng.init = bcm63xx_rng_init; priv->rng.cleanup = bcm63xx_rng_cleanup; - prov->rng.data_present = bcm63xx_rng_data_present; + priv->rng.data_present = bcm63xx_rng_data_present; priv->rng.data_read = bcm63xx_rng_data_read; priv->clk = devm_clk_get(&pdev->dev, "ipsec"); if (IS_ERR(priv->clk)) { - error = PTR_ERR(priv->clk); - dev_err(&pdev->dev, "no clock for device: %d\n", error); - return error; + ret = PTR_ERR(priv->clk); + dev_err(&pdev->dev, "no clock for device: %d\n", ret); + return ret; } if (!devm_request_mem_region(&pdev->dev, r->start, @@ -120,11 +120,11 @@ static int bcm63xx_rng_probe(struct platform_device *pdev) return -ENOMEM; } - error = devm_hwrng_register(&pdev->dev, &priv->rng); - if (error) { + ret = devm_hwrng_register(&pdev->dev, &priv->rng); + if (ret) { dev_err(&pdev->dev, "failed to register rng device: %d\n", - error); - return error; + ret); + return ret; } dev_info(&pdev->dev, "registered RNG driver\n");