]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge 3.13-rc5 into usb-next
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Dec 2013 18:18:03 +0000 (10:18 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Dec 2013 18:18:03 +0000 (10:18 -0800)
This resolves the merge issue with drivers/usb/host/ohci-at91.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1  2 
drivers/usb/chipidea/core.c
drivers/usb/class/cdc-wdm.c
drivers/usb/host/ohci-at91.c
drivers/usb/host/xhci-pci.c
drivers/usb/serial/option.c

Simple merge
Simple merge
index 6d4cf931de5be562838adff55e302a9c05105fcc,8c356af79409f9ef4647d141bc6aa5146791496b..2d0ee5e3127c161d4e903c25ac78b57323de7979
@@@ -136,54 -136,65 +136,58 @@@ static int usb_hcd_at91_probe(const str
        struct ohci_hcd *ohci;
        int retval;
        struct usb_hcd *hcd = NULL;
-       if (pdev->num_resources != 2) {
-               pr_debug("hcd probe: invalid num_resources");
-               return -ENODEV;
+       struct device *dev = &pdev->dev;
+       struct resource *res;
+       int irq;
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res) {
+               dev_dbg(dev, "hcd probe: missing memory resource\n");
+               return -ENXIO;
        }
  
-       if ((pdev->resource[0].flags != IORESOURCE_MEM)
-                       || (pdev->resource[1].flags != IORESOURCE_IRQ)) {
-               pr_debug("hcd probe: invalid resource type\n");
-               return -ENODEV;
+       irq = platform_get_irq(pdev, 0);
+       if (irq < 0) {
+               dev_dbg(dev, "hcd probe: missing irq resource\n");
+               return irq;
        }
  
 -      hcd = usb_create_hcd(driver, &pdev->dev, "at91");
 +      hcd = usb_create_hcd(driver, dev, "at91");
        if (!hcd)
                return -ENOMEM;
-       hcd->rsrc_start = pdev->resource[0].start;
-       hcd->rsrc_len = resource_size(&pdev->resource[0]);
+       hcd->rsrc_start = res->start;
+       hcd->rsrc_len = resource_size(res);
  
 -      if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
 -              pr_debug("request_mem_region failed\n");
 -              retval = -EBUSY;
 -              goto err1;
 +      hcd->regs = devm_ioremap_resource(dev, res);
 +      if (IS_ERR(hcd->regs)) {
 +              retval = PTR_ERR(hcd->regs);
 +              goto err;
        }
  
 -      hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
 -      if (!hcd->regs) {
 -              pr_debug("ioremap failed\n");
 -              retval = -EIO;
 -              goto err2;
 -      }
 -
 -      iclk = clk_get(&pdev->dev, "ohci_clk");
 +      iclk = devm_clk_get(dev, "ohci_clk");
        if (IS_ERR(iclk)) {
 -              dev_err(&pdev->dev, "failed to get ohci_clk\n");
 +              dev_err(dev, "failed to get ohci_clk\n");
                retval = PTR_ERR(iclk);
 -              goto err3;
 +              goto err;
        }
 -      fclk = clk_get(&pdev->dev, "uhpck");
 +      fclk = devm_clk_get(dev, "uhpck");
        if (IS_ERR(fclk)) {
 -              dev_err(&pdev->dev, "failed to get uhpck\n");
 +              dev_err(dev, "failed to get uhpck\n");
                retval = PTR_ERR(fclk);
 -              goto err4;
 +              goto err;
        }
 -      hclk = clk_get(&pdev->dev, "hclk");
 +      hclk = devm_clk_get(dev, "hclk");
        if (IS_ERR(hclk)) {
 -              dev_err(&pdev->dev, "failed to get hclk\n");
 +              dev_err(dev, "failed to get hclk\n");
                retval = PTR_ERR(hclk);
 -              goto err5;
 +              goto err;
        }
        if (IS_ENABLED(CONFIG_COMMON_CLK)) {
 -              uclk = clk_get(&pdev->dev, "usb_clk");
 +              uclk = devm_clk_get(dev, "usb_clk");
                if (IS_ERR(uclk)) {
 -                      dev_err(&pdev->dev, "failed to get uclk\n");
 +                      dev_err(dev, "failed to get uclk\n");
                        retval = PTR_ERR(uclk);
 -                      goto err6;
 +                      goto err;
                }
        }
  
        ohci->num_ports = board->ports;
        at91_start_hc(pdev);
  
-       retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_SHARED);
-       if (retval == 0) {
+       retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
+       if (retval == 0)
 +              device_wakeup_enable(hcd->self.controller);
                return retval;
 +      }
  
        /* Error handling */
        at91_stop_hc(pdev);
Simple merge
Simple merge