From patchwork Fri Nov 11 10:50:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 5071 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 30B8123E0F for ; Fri, 11 Nov 2011 10:51:34 +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 252C4A183EA for ; Fri, 11 Nov 2011 10:51:34 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id n26so5533536faa.11 for ; Fri, 11 Nov 2011 02:51:34 -0800 (PST) Received: by 10.152.162.10 with SMTP id xw10mr6420676lab.12.1321008693900; Fri, 11 Nov 2011 02:51:33 -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 t7cs43146lak; Fri, 11 Nov 2011 02:51:33 -0800 (PST) Received: by 10.52.33.69 with SMTP id p5mr19707522vdi.78.1321008691803; Fri, 11 Nov 2011 02:51:31 -0800 (PST) Received: from TX2EHSOBE004.bigfish.com (tx2ehsobe002.messaging.microsoft.com. [65.55.88.12]) by mx.google.com with ESMTPS id d30si10218373yhl.34.2011.11.11.02.51.31 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 11 Nov 2011 02:51:31 -0800 (PST) Received-SPF: neutral (google.com: 65.55.88.12 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=65.55.88.12; Authentication-Results: mx.google.com; spf=neutral (google.com: 65.55.88.12 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: from mail28-tx2-R.bigfish.com (10.9.14.253) by TX2EHSOBE004.bigfish.com (10.9.40.24) with Microsoft SMTP Server id 14.1.225.22; Fri, 11 Nov 2011 10:51:05 +0000 Received: from mail28-tx2 (localhost.localdomain [127.0.0.1]) by mail28-tx2-R.bigfish.com (Postfix) with ESMTP id AE75B17381B0; Fri, 11 Nov 2011 10:51:15 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h66h) X-Spam-TCS-SCL: 5:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail28-tx2 (localhost.localdomain [127.0.0.1]) by mail28-tx2 (MessageSwitch) id 1321008675404687_10349; Fri, 11 Nov 2011 10:51:15 +0000 (UTC) Received: from TX2EHSMHS044.bigfish.com (unknown [10.9.14.245]) by mail28-tx2.bigfish.com (Postfix) with ESMTP id 5A4BD568046; Fri, 11 Nov 2011 10:51:15 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS044.bigfish.com (10.9.99.144) with Microsoft SMTP Server (TLS) id 14.1.225.22; Fri, 11 Nov 2011 10:51:04 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.339.2; Fri, 11 Nov 2011 04:51:29 -0600 Received: from b20223-02.ap.freescale.net (b20223-02-010192242124.ap.freescale.net [10.192.242.124]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id pABAoecW000610; Fri, 11 Nov 2011 04:51:25 -0600 (CST) From: Richard Zhao To: , , , , CC: , , , , , , , Richard Zhao Subject: [PATCH V3 12/14] net: fec: add clk_prepare/clk_unprepare Date: Fri, 11 Nov 2011 18:50:35 +0800 Message-ID: <1321008637-19999-13-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1321008637-19999-1-git-send-email-richard.zhao@linaro.org> References: <1321008637-19999-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);