[PATCH_V3 3/3] usb: ohci: jz4740: prepare the clock before enabling it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




From: Paul Burton <paul.burton@xxxxxxxxxx>

The clock must have been prepared before enabling it.

Signed-off-by: Paul Burton <paul.burton@xxxxxxxxxx>
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@xxxxxxxxxx>
Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

--
V2 changes. Add disable_unprepare as well
---
 drivers/usb/host/ohci-jz4740.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ohci-jz4740.c b/drivers/usb/host/ohci-jz4740.c
index bb69733..129f6b9 100644
--- a/drivers/usb/host/ohci-jz4740.c
+++ b/drivers/usb/host/ohci-jz4740.c
@@ -189,7 +189,7 @@ static int jz4740_ohci_probe(struct platform_device *pdev)
 
 
 	clk_set_rate(jz4740_ohci->clk, 48000000);
-	clk_enable(jz4740_ohci->clk);
+	clk_prepare_enable(jz4740_ohci->clk);
 	if (jz4740_ohci->vbus)
 		ohci_jz4740_set_vbus_power(jz4740_ohci, true);
 
@@ -209,7 +209,7 @@ static int jz4740_ohci_probe(struct platform_device *pdev)
 err_disable:
 	if (jz4740_ohci->vbus)
 		regulator_disable(jz4740_ohci->vbus);
-	clk_disable(jz4740_ohci->clk);
+	clk_disable_unprepare(jz4740_ohci->clk);
 
 err_free:
 	usb_put_hcd(hcd);
@@ -227,7 +227,7 @@ static int jz4740_ohci_remove(struct platform_device *pdev)
 	if (jz4740_ohci->vbus)
 		regulator_disable(jz4740_ohci->vbus);
 
-	clk_disable(jz4740_ohci->clk);
+	clk_disable_unprepare(jz4740_ohci->clk);
 
 	usb_put_hcd(hcd);
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux