From patchwork Fri Nov 11 01:10:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 5050 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 EE35523E01 for ; Fri, 11 Nov 2011 01:12:00 +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 DC1D2A18320 for ; Fri, 11 Nov 2011 01:12:00 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id n26so5072572faa.11 for ; Thu, 10 Nov 2011 17:12:00 -0800 (PST) Received: by 10.152.105.226 with SMTP id gp2mr5704263lab.28.1320973920733; Thu, 10 Nov 2011 17:12:00 -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.40.7 with SMTP id t7cs30860lak; Thu, 10 Nov 2011 17:12:00 -0800 (PST) Received: by 10.68.17.201 with SMTP id q9mr19185476pbd.15.1320973918181; Thu, 10 Nov 2011 17:11:58 -0800 (PST) Received: from VA3EHSOBE001.bigfish.com (va3ehsobe001.messaging.microsoft.com. [216.32.180.11]) by mx.google.com with ESMTPS id a4si13197038pbc.136.2011.11.10.17.11.57 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Nov 2011 17:11:58 -0800 (PST) Received-SPF: neutral (google.com: 216.32.180.11 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=216.32.180.11; Authentication-Results: mx.google.com; spf=neutral (google.com: 216.32.180.11 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: from mail128-va3-R.bigfish.com (10.7.14.241) by VA3EHSOBE001.bigfish.com (10.7.40.21) with Microsoft SMTP Server id 14.1.225.22; Fri, 11 Nov 2011 01:11:31 +0000 Received: from mail128-va3 (localhost [127.0.0.1]) by mail128-va3-R.bigfish.com (Postfix) with ESMTP id 5DCDD2004AB; Mon, 24 Oct 2011 05:11:11 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h67h) X-Spam-TCS-SCL: 6: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 mail128-va3 (localhost.localdomain [127.0.0.1]) by mail128-va3 (MessageSwitch) id 131943307188992_21620; Mon, 24 Oct 2011 05:11:11 +0000 (UTC) Received: from VA3EHSMHS020.bigfish.com (unknown [10.7.14.237]) by mail128-va3.bigfish.com (Postfix) with ESMTP id 07D7A6C0046; Mon, 24 Oct 2011 05:11:11 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS020.bigfish.com (10.7.99.30) with Microsoft SMTP Server (TLS) id 14.1.225.22; Fri, 11 Nov 2011 01:11:31 +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; Thu, 10 Nov 2011 19:11:55 -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 pAB1B4bU016594; Thu, 10 Nov 2011 19:11:51 -0600 (CST) From: Richard Zhao To: , , , , CC: , , , , , , , Richard Zhao Subject: [PATCH V2 12/14] net: fec: add clk_prepare/clk_unprepare Date: Fri, 11 Nov 2011 09:10:27 +0800 Message-ID: <1320973829-4388-13-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1320973829-4388-1-git-send-email-richard.zhao@linaro.org> References: <1320973829-4388-1-git-send-email-richard.zhao@linaro.org> MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com 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);