From patchwork Tue Nov 15 06:48:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 5137 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 D74C723E10 for ; Tue, 15 Nov 2011 06:49:11 +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 CBF17A18209 for ; Tue, 15 Nov 2011 06:49:11 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id a26so111371faa.11 for ; Mon, 14 Nov 2011 22:49:11 -0800 (PST) Received: by 10.152.135.179 with SMTP id pt19mr16009528lab.47.1321339751596; Mon, 14 Nov 2011 22:49:11 -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 h6cs27870lal; Mon, 14 Nov 2011 22:49:11 -0800 (PST) Received: by 10.68.29.168 with SMTP id l8mr56310894pbh.84.1321339749119; Mon, 14 Nov 2011 22:49:09 -0800 (PST) Received: from VA3EHSOBE005.bigfish.com (va3ehsobe005.messaging.microsoft.com. [216.32.180.31]) by mx.google.com with ESMTPS id jk8si29609935pbc.223.2011.11.14.22.49.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Nov 2011 22:49:09 -0800 (PST) Received-SPF: neutral (google.com: 216.32.180.31 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=216.32.180.31; Authentication-Results: mx.google.com; spf=neutral (google.com: 216.32.180.31 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: from mail4-va3-R.bigfish.com (10.7.14.249) by VA3EHSOBE005.bigfish.com (10.7.40.25) with Microsoft SMTP Server id 14.1.225.22; Tue, 15 Nov 2011 06:48:37 +0000 Received: from mail4-va3 (localhost [127.0.0.1]) by mail4-va3-R.bigfish.com (Postfix) with ESMTP id 32FC6440305; Tue, 15 Nov 2011 06:44:23 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h65h) X-Spam-TCS-SCL: 4: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 mail4-va3 (localhost.localdomain [127.0.0.1]) by mail4-va3 (MessageSwitch) id 1321339462963767_29305; Tue, 15 Nov 2011 06:44:22 +0000 (UTC) Received: from VA3EHSMHS019.bigfish.com (unknown [10.7.14.251]) by mail4-va3.bigfish.com (Postfix) with ESMTP id E25A03A0046; Tue, 15 Nov 2011 06:44:22 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS019.bigfish.com (10.7.99.29) with Microsoft SMTP Server (TLS) id 14.1.225.22; Tue, 15 Nov 2011 06:48:35 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.339.2; Tue, 15 Nov 2011 00:49:04 -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 pAF6mDVU025706; Tue, 15 Nov 2011 00:49:00 -0600 (CST) From: Richard Zhao To: , , , , CC: , , , , , , , Subject: [PATCH V4 12/14] net: fec: add clk_prepare/clk_unprepare Date: Tue, 15 Nov 2011 14:48:07 +0800 Message-ID: <1321339689-25256-13-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/net/ethernet/freescale/fec.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c index 1124ce0..e96fa44 100644 --- a/drivers/net/ethernet/freescale/fec.c +++ b/drivers/net/ethernet/freescale/fec.c @@ -1588,7 +1588,7 @@ fec_probe(struct platform_device *pdev) ret = PTR_ERR(fep->clk); goto failed_clk; } - clk_enable(fep->clk); + clk_prepare_enable(fep->clk); ret = fec_enet_init(ndev); if (ret) @@ -1611,7 +1611,7 @@ failed_register: fec_enet_mii_remove(fep); failed_mii_init: failed_init: - clk_disable(fep->clk); + clk_disable_unprepare(fep->clk); clk_put(fep->clk); failed_clk: for (i = 0; i < FEC_IRQ_NUM; i++) { @@ -1638,7 +1638,7 @@ fec_drv_remove(struct platform_device *pdev) fec_stop(ndev); fec_enet_mii_remove(fep); - clk_disable(fep->clk); + clk_disable_unprepare(fep->clk); clk_put(fep->clk); iounmap(fep->hwp); unregister_netdev(ndev); @@ -1664,7 +1664,7 @@ fec_suspend(struct device *dev) fec_stop(ndev); netif_device_detach(ndev); } - clk_disable(fep->clk); + clk_disable_unprepare(fep->clk); return 0; } @@ -1675,7 +1675,7 @@ fec_resume(struct device *dev) struct net_device *ndev = dev_get_drvdata(dev); struct fec_enet_private *fep = netdev_priv(ndev); - clk_enable(fep->clk); + clk_prepare_enable(fep->clk); if (netif_running(ndev)) { fec_restart(ndev, fep->full_duplex); netif_device_attach(ndev);