diff options
author | Amardeep Rai <amardeep.rai-ext@st.com> | 2012-11-08 10:07:58 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-14 15:15:20 -0500 |
commit | d8fd7d5ae3e0561920b38647793b1947e07c7acf (patch) | |
tree | 0516dd9424ebfa62eddcce59683388e0b279e059 /drivers/usb/host/ohci-spear.c | |
parent | bc13364b3413a3815740c4a2f087e06f1b7ed850 (diff) |
usb: spear-ehci/ohci: Do clk_get using dev-id
We used to get clk using con-id, but now we have device struct available for
these devices as they are probed using DT. And so must get clk using dev-id.
Signed-off-by: Amardeep Rai <amardeep.rai-ext@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-spear.c')
-rw-r--r-- | drivers/usb/host/ohci-spear.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/usb/host/ohci-spear.c b/drivers/usb/host/ohci-spear.c index d607be33c03c..974770833653 100644 --- a/drivers/usb/host/ohci-spear.c +++ b/drivers/usb/host/ohci-spear.c | |||
@@ -101,8 +101,6 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev) | |||
101 | struct spear_ohci *ohci_p; | 101 | struct spear_ohci *ohci_p; |
102 | struct resource *res; | 102 | struct resource *res; |
103 | int retval, irq; | 103 | int retval, irq; |
104 | char clk_name[20] = "usbh_clk"; | ||
105 | static int instance = -1; | ||
106 | 104 | ||
107 | irq = platform_get_irq(pdev, 0); | 105 | irq = platform_get_irq(pdev, 0); |
108 | if (irq < 0) { | 106 | if (irq < 0) { |
@@ -118,16 +116,7 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev) | |||
118 | if (!pdev->dev.dma_mask) | 116 | if (!pdev->dev.dma_mask) |
119 | pdev->dev.dma_mask = &spear_ohci_dma_mask; | 117 | pdev->dev.dma_mask = &spear_ohci_dma_mask; |
120 | 118 | ||
121 | /* | 119 | usbh_clk = clk_get(&pdev->dev, NULL); |
122 | * Increment the device instance, when probing via device-tree | ||
123 | */ | ||
124 | if (pdev->id < 0) | ||
125 | instance++; | ||
126 | else | ||
127 | instance = pdev->id; | ||
128 | sprintf(clk_name, "usbh.%01d_clk", instance); | ||
129 | |||
130 | usbh_clk = clk_get(NULL, clk_name); | ||
131 | if (IS_ERR(usbh_clk)) { | 120 | if (IS_ERR(usbh_clk)) { |
132 | dev_err(&pdev->dev, "Error getting interface clock\n"); | 121 | dev_err(&pdev->dev, "Error getting interface clock\n"); |
133 | retval = PTR_ERR(usbh_clk); | 122 | retval = PTR_ERR(usbh_clk); |