From patchwork Mon Dec 30 18:30:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 3420471 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 74153C02DC for ; Mon, 30 Dec 2013 18:31:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5555A20109 for ; Mon, 30 Dec 2013 18:31:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E0C5200F2 for ; Mon, 30 Dec 2013 18:31:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755867Ab3L3SbR (ORCPT ); Mon, 30 Dec 2013 13:31:17 -0500 Received: from guitar.tcltek.co.il ([192.115.133.116]:41941 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756135Ab3L3SbQ (ORCPT ); Mon, 30 Dec 2013 13:31:16 -0500 Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) by mx.tkos.co.il (Postfix) with ESMTPSA id 7C52E440AAB; Mon, 30 Dec 2013 20:31:13 +0200 (IST) From: Baruch Siach To: Mark Brown Cc: linux-spi@vger.kernel.org, Feng Tang , Jean-Hugues Deschenes , Baruch Siach Subject: [PATCH v2 2/3] spi: dw-mmio: prepare the clock before enabling Date: Mon, 30 Dec 2013 20:30:45 +0200 Message-Id: <0d505c4fb810d92978c315fc37f990daa35aa760.1388427564.git.baruch@tkos.co.il> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: References: Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 This is required for common clock support. Cc: Jean-Hugues Deschenes Signed-off-by: Baruch Siach --- drivers/spi/spi-dw-mmio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c index 569adf8..9af56cd 100644 --- a/drivers/spi/spi-dw-mmio.c +++ b/drivers/spi/spi-dw-mmio.c @@ -62,7 +62,7 @@ static int dw_spi_mmio_probe(struct platform_device *pdev) dwsmmio->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(dwsmmio->clk)) return PTR_ERR(dwsmmio->clk); - ret = clk_enable(dwsmmio->clk); + ret = clk_prepare_enable(dwsmmio->clk); if (ret) return ret; @@ -78,7 +78,7 @@ static int dw_spi_mmio_probe(struct platform_device *pdev) return 0; out: - clk_disable(dwsmmio->clk); + clk_disable_unprepare(dwsmmio->clk); return ret; } @@ -86,7 +86,7 @@ static int dw_spi_mmio_remove(struct platform_device *pdev) { struct dw_spi_mmio *dwsmmio = platform_get_drvdata(pdev); - clk_disable(dwsmmio->clk); + clk_disable_unprepare(dwsmmio->clk); dw_spi_remove_host(&dwsmmio->dws); return 0;