From patchwork Tue Nov 15 06:48:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 5135 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1AB2823E10 for ; Tue, 15 Nov 2011 06:49:06 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 07FB9A18223 for ; Tue, 15 Nov 2011 06:49:06 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id a26so111371faa.11 for ; Mon, 14 Nov 2011 22:49:06 -0800 (PST) Received: by 10.152.105.226 with SMTP id gp2mr16069299lab.28.1321339745861; Mon, 14 Nov 2011 22:49:05 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.41.198 with SMTP id h6cs27867lal; Mon, 14 Nov 2011 22:49:05 -0800 (PST) Received: by 10.68.24.231 with SMTP id x7mr56432580pbf.33.1321339743486; Mon, 14 Nov 2011 22:49:03 -0800 (PST) Received: from VA3EHSOBE003.bigfish.com (va3ehsobe003.messaging.microsoft.com. [216.32.180.13]) by mx.google.com with ESMTPS id u4si29689540pba.28.2011.11.14.22.49.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Nov 2011 22:49:03 -0800 (PST) Received-SPF: neutral (google.com: 216.32.180.13 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=216.32.180.13; Authentication-Results: mx.google.com; spf=neutral (google.com: 216.32.180.13 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: from mail108-va3-R.bigfish.com (10.7.14.246) by VA3EHSOBE003.bigfish.com (10.7.40.23) with Microsoft SMTP Server id 14.1.225.22; Tue, 15 Nov 2011 06:48:31 +0000 Received: from mail108-va3 (localhost [127.0.0.1]) by mail108-va3-R.bigfish.com (Postfix) with ESMTP id 46F9B5C02E4; Tue, 15 Nov 2011 06:49:36 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail108-va3 (localhost.localdomain [127.0.0.1]) by mail108-va3 (MessageSwitch) id 1321339776163142_32187; Tue, 15 Nov 2011 06:49:36 +0000 (UTC) Received: from VA3EHSMHS008.bigfish.com (unknown [10.7.14.245]) by mail108-va3.bigfish.com (Postfix) with ESMTP id 1F2CC80019; Tue, 15 Nov 2011 06:49:36 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS008.bigfish.com (10.7.99.18) with Microsoft SMTP Server (TLS) id 14.1.225.22; Tue, 15 Nov 2011 06:48:31 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.339.2; Tue, 15 Nov 2011 00:49:00 -0600 Received: from b20223-02.ap.freescale.net (b20223-02.ap.freescale.net [10.192.242.124]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id pAF6mDVT025706; Tue, 15 Nov 2011 00:48:57 -0600 (CST) From: Richard Zhao To: , , , , CC: , , , , , , , Subject: [PATCH V4 11/14] serial: imx: add clk_prepare/clk_unprepare Date: Tue, 15 Nov 2011 14:48:06 +0800 Message-ID: <1321339689-25256-12-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1321339689-25256-1-git-send-email-richard.zhao@linaro.org> References: <1321339689-25256-1-git-send-email-richard.zhao@linaro.org> MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com It's for migrating to generic clk framework API. Signed-off-by: Richard Zhao --- drivers/tty/serial/imx.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 163fc90..8f3709f 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1390,7 +1390,7 @@ static int serial_imx_probe(struct platform_device *pdev) ret = PTR_ERR(sport->clk); goto unmap; } - clk_enable(sport->clk); + clk_prepare_enable(sport->clk); sport->port.uartclk = clk_get_rate(sport->clk); @@ -1413,8 +1413,8 @@ deinit: if (pdata && pdata->exit) pdata->exit(pdev); clkput: + clk_disable_unprepare(sport->clk); clk_put(sport->clk); - clk_disable(sport->clk); unmap: iounmap(sport->port.membase); free: @@ -1434,11 +1434,10 @@ static int serial_imx_remove(struct platform_device *pdev) if (sport) { uart_remove_one_port(&imx_reg, &sport->port); + clk_disable_unprepare(sport->clk); clk_put(sport->clk); } - clk_disable(sport->clk); - if (pdata && pdata->exit) pdata->exit(pdev);