Patchwork [2/2] usb: fsl_mxc_udc.c: fix mxc_ahb_clk disable for i.MX25

login
register
mail settings
Submitter Eric Benard
Date May 8, 2012, 7:18 a.m.
Message ID <1336461510-30190-2-git-send-email-eric@eukrea.com>
Download mbox | patch
Permalink /patch/157565/
State New
Headers show

Comments

Eric Benard - May 8, 2012, 7:18 a.m.
as i.MX35, i.MX25 doesn't have this clock so don't try to disable/put it.

Signed-off-by: Eric BĂ©nard <eric@eukrea.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
---
 drivers/usb/gadget/fsl_mxc_udc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/drivers/usb/gadget/fsl_mxc_udc.c b/drivers/usb/gadget/fsl_mxc_udc.c
index 8bbf673..4e30fb6 100644
--- a/drivers/usb/gadget/fsl_mxc_udc.c
+++ b/drivers/usb/gadget/fsl_mxc_udc.c
@@ -78,10 +78,10 @@  eclkrate:
 	clk_put(mxc_usb_clk);
 	mxc_usb_clk = NULL;
 egusb:
-	if (!cpu_is_mx35())
+	if (!cpu_is_mx35() && !cpu_is_mx25())
 		clk_disable(mxc_ahb_clk);
 eenahb:
-	if (!cpu_is_mx35())
+	if (!cpu_is_mx35() && !cpu_is_mx25())
 		clk_put(mxc_ahb_clk);
 	return ret;
 }
@@ -120,7 +120,7 @@  void fsl_udc_clk_release(void)
 		clk_disable(mxc_usb_clk);
 		clk_put(mxc_usb_clk);
 	}
-	if (!cpu_is_mx35()) {
+	if (!cpu_is_mx35() && !cpu_is_mx25()) {
 		clk_disable(mxc_ahb_clk);
 		clk_put(mxc_ahb_clk);
 	}