From d8fd7d5ae3e0561920b38647793b1947e07c7acf Mon Sep 17 00:00:00 2001 From: Amardeep Rai Date: Thu, 8 Nov 2012 20:37:58 +0530 Subject: 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 Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-spear.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/usb/host/ohci-spear.c') 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) struct spear_ohci *ohci_p; struct resource *res; int retval, irq; - char clk_name[20] = "usbh_clk"; - static int instance = -1; irq = platform_get_irq(pdev, 0); if (irq < 0) { @@ -118,16 +116,7 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev) if (!pdev->dev.dma_mask) pdev->dev.dma_mask = &spear_ohci_dma_mask; - /* - * Increment the device instance, when probing via device-tree - */ - if (pdev->id < 0) - instance++; - else - instance = pdev->id; - sprintf(clk_name, "usbh.%01d_clk", instance); - - usbh_clk = clk_get(NULL, clk_name); + usbh_clk = clk_get(&pdev->dev, NULL); if (IS_ERR(usbh_clk)) { dev_err(&pdev->dev, "Error getting interface clock\n"); retval = PTR_ERR(usbh_clk); -- cgit v1.2.3