From patchwork Sat May 2 10:08:42 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: 6314241 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 03947BEEE1 for ; Sat, 2 May 2015 10:09:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E30FD20429 for ; Sat, 2 May 2015 10:09:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E89DB2041E for ; Sat, 2 May 2015 10:09:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750941AbbEBKIv (ORCPT ); Sat, 2 May 2015 06:08:51 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:34833 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839AbbEBKIu (ORCPT ); Sat, 2 May 2015 06:08:50 -0400 Received: by wgyo15 with SMTP id o15so109582370wgy.2; Sat, 02 May 2015 03:08:48 -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:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=qXT1ZVIx3DpI5aw4kgcJ6PvjFWD6TrPo1aIDFWUvj/A=; b=kf+egRxeLA7x9NVxgcgM0JJvuIbUIQK7Ea2Z2XPvmrYjYxMzl/igBW+2m+7CHyEAQQ jLLRyRV4/ynnsxoc6a9rTW3+U1eIhqXYHdak01lWJ1iVuE4PtpGU9qYs4Mln/8vFmjsD ptrjcEBdXTeXBgM5iuBP9nG37/W1lMNC9pQ4l7sVWadha1PRu24BclJ+zECrfnEaGlgA R3/GGa4aPGJ9/MKLJYvcymOqHeJaEg35YQ70zB6FtK9Ou6gt1CbrVmqS7/xr/uF+bMG3 JpML3Yy4OZgYSGZldiOaMSg1QUxPte0a5Hd7yIoPf0nBPSThE/KTGRl3229xUwkXx8w9 55Dg== X-Received: by 10.180.103.130 with SMTP id fw2mr3857796wib.87.1430561328688; Sat, 02 May 2015 03:08:48 -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 ez19sm1729045wid.19.2015.05.02.03.08.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 02 May 2015 03:08:47 -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 v2] hw_random: bcm63xx-rng: Fix driver compilation Date: Sat, 2 May 2015 12:08:42 +0200 Message-Id: <1430561322-26309-1-git-send-email-noltari@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430491041-24480-1-git-send-email-noltari@gmail.com> References: <1430491041-24480-1-git-send-email-noltari@gmail.com> 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 (bcm63xx_rng_probe) Fixes: 6229c16060fe ("hwrng: bcm63xx - make use of devm_hwrng_register") Signed-off-by: Álvaro Fernández Rojas --- v2: fix subject, add fixes tag as suggested by Florian 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");