[rft/rfc/patch-v2.6.29-rc5+ 22/23] ehci-omap: Remove defines for clock names

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

 



From: Tony Lindgren <tony@xxxxxxxxxxx>

This just makes it harder to figure out the clock names
when reading the code. If the clock change, they should
get set dynamically.

Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
---
 drivers/usb/host/ehci-omap.c |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index e413601..ebfed95 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -163,13 +163,6 @@ struct ehci_hcd_omap {
 	void __iomem		*ehci_base;
 };
 
-/* Clock names as per clock framework: May change so keep as #defs */
-#define USBHOST_ICKL		"usbhost_ick"
-#define USBHOST_120M_FCLK	"usbhost_120m_fck"
-#define USBHOST_48M_FCLK	"usbhost_48m_fck"
-#define USBHOST_TLL_ICKL	"usbtll_ick"
-#define USBHOST_TLL_FCLK	"usbtll_fck"
-
 /*-------------------------------------------------------------------------*/
 
 static void omap_usb_utmi_init(struct ehci_hcd_omap *omap, u8 tll_channel_mask)
@@ -265,21 +258,21 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 
 
 	/* Enable Clocks for USBHOST */
-	omap->usbhost_ick = clk_get(omap->dev, USBHOST_ICKL);
+	omap->usbhost_ick = clk_get(omap->dev, "usbhost_ick");
 	if (IS_ERR(omap->usbhost_ick)) {
 		ret =  PTR_ERR(omap->usbhost_ick);
 		goto err_host_ick;
 	}
 	clk_enable(omap->usbhost_ick);
 
-	omap->usbhost2_120m_fck = clk_get(omap->dev, USBHOST_120M_FCLK);
+	omap->usbhost2_120m_fck = clk_get(omap->dev, "usbhost_120m_fck");
 	if (IS_ERR(omap->usbhost2_120m_fck)) {
 		ret = PTR_ERR(omap->usbhost2_120m_fck);
 		goto err_host_120m_fck;
 	}
 	clk_enable(omap->usbhost2_120m_fck);
 
-	omap->usbhost1_48m_fck = clk_get(omap->dev, USBHOST_48M_FCLK);
+	omap->usbhost1_48m_fck = clk_get(omap->dev, "usbhost_48m_fck");
 	if (IS_ERR(omap->usbhost1_48m_fck)) {
 		ret = PTR_ERR(omap->usbhost1_48m_fck);
 		goto err_host_48m_fck;
@@ -297,14 +290,14 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
 	}
 
 	/* Configure TLL for 60Mhz clk for ULPI */
-	omap->usbtll_fck = clk_get(omap->dev, USBHOST_TLL_FCLK);
+	omap->usbtll_fck = clk_get(omap->dev, "usbtll_fck");
 	if (IS_ERR(omap->usbtll_fck)) {
 		ret = PTR_ERR(omap->usbtll_fck);
 		goto err_tll_fck;
 	}
 	clk_enable(omap->usbtll_fck);
 
-	omap->usbtll_ick = clk_get(omap->dev, USBHOST_TLL_ICKL);
+	omap->usbtll_ick = clk_get(omap->dev, "usbtll_ick");
 	if (IS_ERR(omap->usbtll_ick)) {
 		ret = PTR_ERR(omap->usbtll_ick);
 		goto err_tll_ick;
-- 
1.6.1.3

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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux