From patchwork Thu Aug 18 17:34:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 9288761 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B10F607FF for ; Fri, 19 Aug 2016 00:59:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CC3A29203 for ; Fri, 19 Aug 2016 00:59:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 810472926D; Fri, 19 Aug 2016 00:59:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1876429203 for ; Fri, 19 Aug 2016 00:59:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754187AbcHSA7c (ORCPT ); Thu, 18 Aug 2016 20:59:32 -0400 Received: from leibniz.telenet-ops.be ([195.130.137.77]:59229 "EHLO leibniz.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754151AbcHSA7a (ORCPT ); Thu, 18 Aug 2016 20:59:30 -0400 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by leibniz.telenet-ops.be (Postfix) with ESMTP id 3sFYBq6w4MzMqvZ7 for ; Thu, 18 Aug 2016 19:34:59 +0200 (CEST) Received: from ayla.of.borg ([84.193.137.253]) by michel.telenet-ops.be with bizsmtp id YhaZ1t00N5UCtCs06haZD4; Thu, 18 Aug 2016 19:34:36 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1baRD7-0002hQ-Jl; Thu, 18 Aug 2016 19:34:33 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1baRD9-0007zl-LK; Thu, 18 Aug 2016 19:34:35 +0200 From: Geert Uytterhoeven To: Ralf Baechle , Atsushi Nemoto , Mark Brown , Wim Van Sebroeck , Guenter Roeck Cc: linux-clk@vger.kernel.org, linux-mips@linux-mips.org, linux-spi@vger.kernel.org, linux-watchdog@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/3] spi: spi-txx9: Add missing clock (un)prepare calls for CCF Date: Thu, 18 Aug 2016 19:34:25 +0200 Message-Id: <1471541667-30689-2-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1471541667-30689-1-git-send-email-geert@linux-m68k.org> References: <1471541667-30689-1-git-send-email-geert@linux-m68k.org> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While the custom minimal TXx9 clock implementation doesn't need or use clock (un)prepare calls (they are dummies if !CONFIG_HAVE_CLK_PREPARE), they are mandatory when using the Common Clock Framework. Hence add them, to prepare for the advent of CCF. Signed-off-by: Geert Uytterhoeven --- Untested due to lack of hardware. --- drivers/spi/spi-txx9.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-txx9.c b/drivers/spi/spi-txx9.c index 7492ea346b43ed5b..51759d3fd45f6b06 100644 --- a/drivers/spi/spi-txx9.c +++ b/drivers/spi/spi-txx9.c @@ -346,7 +346,7 @@ static int txx9spi_probe(struct platform_device *dev) c->clk = NULL; goto exit; } - ret = clk_enable(c->clk); + ret = clk_prepare_enable(c->clk); if (ret) { c->clk = NULL; goto exit; @@ -395,7 +395,7 @@ static int txx9spi_probe(struct platform_device *dev) exit_busy: ret = -EBUSY; exit: - clk_disable(c->clk); + clk_disable_unprepare(c->clk); spi_master_put(master); return ret; } @@ -406,7 +406,7 @@ static int txx9spi_remove(struct platform_device *dev) struct txx9spi *c = spi_master_get_devdata(master); flush_work(&c->work); - clk_disable(c->clk); + clk_disable_unprepare(c->clk); return 0; }