From patchwork Tue Dec 19 07:24:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 850647 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kD71IUMj"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z18Zs4nttz9s9Y for ; Tue, 19 Dec 2017 18:25:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date: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=LszygqRETtzgwZlxvwjz8YmWjkJ/BWXfIIqH0kJAncc=; b=kD71IUMjpaN41E sZK3cG1bRMMZXzK6sIOPVePBdAqqjsHXwfdtTjXFU37DzLCgg/1uaGLozs9YKoXd3c2EEh5RLKvt3 eC5Ox9Ea6tqFPw5N55RFbHNAGE5rd8ivbzXll3D4UeIKsuqFDpj7tOsFbYPI0sXSWGYpFNSEIWMWE iha9Inw5xh2vvH0afuq7axXSBAsz99e/gRk5iTv/78aeWGmRdFld/6j5HQiaTGJ/kvpYPU0zxkOac m6YpFPjDQgNOA+onRIMQXuhmiEWbgB/tLkGnWotfVBD3GXrU99IbMcfCGSWSx3aMk6HrS+3kprz6j 7xVLvPtNxhASEgSsw94g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eRCHS-0004nB-Tf; Tue, 19 Dec 2017 07:25:38 +0000 Received: from arrakis.dune.hu ([78.24.191.176]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eRCHO-0004jV-Sp for lede-dev@lists.infradead.org; Tue, 19 Dec 2017 07:25:37 +0000 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D80AFB800D9; Tue, 19 Dec 2017 08:25:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.1 Received: from localhost.localdomain (91.83.8.229.pool.invitel.hu [91.83.8.229]) by arrakis.dune.hu (Postfix) with ESMTPSA; Tue, 19 Dec 2017 08:25:08 +0100 (CET) From: Gabor Juhos To: lede-dev@lists.infradead.org Date: Tue, 19 Dec 2017 08:24:38 +0100 Message-Id: <20171219072438.30624-1-juhosg@freemail.hu> X-Mailer: git-send-email 2.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171218_232535_109524_9BD70039 X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [78.24.191.176 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (juhosg[at]freemail.hu) 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH] ar71xx: spi-rb4xx: balance clk_prepare_enable() call X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gabor Juhos MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Commit c312cef223dd ("ar71xx: spi-rb4xx fix.") replaced the clk_enable() call with clk_prepare_enable() to meet the common clock framework requirements. However it did not change the clk_disable() call in the error patch which thus leads to imbalance. Fix the code by using the correct counterpart of clk_prepare_enable() in both places. Fixes: c312cef223dd ("ar71xx: spi-rb4xx fix.") Signed-off-by: Gabor Juhos --- target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c b/target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c index 9175fc7ae3..2d95e80495 100644 --- a/target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c +++ b/target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c @@ -379,7 +379,7 @@ static int rb4xx_spi_probe(struct platform_device *pdev) err_iounmap: iounmap(rbspi->base); err_clk_disable: - clk_disable(rbspi->ahb_clk); + clk_disable_unprepare(rbspi->ahb_clk); err_clk_put: clk_put(rbspi->ahb_clk); err_put_master: @@ -394,7 +394,7 @@ static int rb4xx_spi_remove(struct platform_device *pdev) struct rb4xx_spi *rbspi = platform_get_drvdata(pdev); iounmap(rbspi->base); - clk_disable(rbspi->ahb_clk); + clk_disable_unprepare(rbspi->ahb_clk); clk_put(rbspi->ahb_clk); platform_set_drvdata(pdev, NULL); spi_master_put(rbspi->master);