Hi,

On Sat, Apr 06, 2013 at 12:21:52AM +0300, Felipe Balbi wrote:
> Hi Greg,
> 
> Here's a giant pull request for v3.10. All patches have been on linux-next for
> quite a while and have gone through build and boot testing.
> 
> I haven't heard any complaints from Fengguang's 0-day build for some time now,
> so it shouldn't add any new build warnings or build errors.
> 
> Let me know if you want/need further detail on the tag message, but given the
> amount of changes in this pull request, I decided bullet points would be 
> easier
> to parse.

forgot to mention, there will be some conflicts; here's my suggested
resolution:

diff --cc drivers/usb/chipidea/udc.c
index 3d90e61,9bddf3f..519ead2
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@@ -1708,19 -1742,18 +1692,13 @@@ static int udc_start(struct ci13xxx *ci
                retval = hw_device_reset(ci, USBMODE_CM_DC);
                if (retval)
                        goto put_transceiver;
 -              hw_enable_vbus_intr(ci);
        }
  
-       retval = device_register(&ci->gadget.dev);
-       if (retval) {
-               put_device(&ci->gadget.dev);
-               goto put_transceiver;
-       }
- 
 -      retval = dbg_create_files(ci->dev);
 -      if (retval)
 -              goto put_transceiver;
 -
        if (!IS_ERR_OR_NULL(ci->transceiver)) {
                retval = otg_set_peripheral(ci->transceiver->otg,
                                                &ci->gadget);
                if (retval)
-                       goto unreg_device;
 -                      goto remove_dbg;
++                      goto put_transceiver;
        }
  
        retval = usb_add_gadget_udc(dev, &ci->gadget);
@@@ -1740,8 -1773,8 +1718,6 @@@ remove_trans
        }
  
        dev_err(dev, "error = %i\n", retval);
- unreg_device:
-       device_unregister(&ci->gadget.dev);
 -remove_dbg:
 -      dbg_remove_files(ci->dev);
  put_transceiver:
        if (!IS_ERR_OR_NULL(ci->transceiver) && ci->global_phy)
                usb_put_phy(ci->transceiver);
@@@ -1776,7 -1812,7 +1752,6 @@@ static void udc_stop(struct ci13xxx *ci
                if (ci->global_phy)
                        usb_put_phy(ci->transceiver);
        }
-       device_unregister(&ci->gadget.dev);
 -      dbg_remove_files(ci->dev);
        /* my kobject is dynamic, I swear! */
        memset(&ci->gadget, 0, sizeof(ci->gadget));
  }
diff --cc drivers/usb/gadget/g_ffs.c
index 3b343b2,a07dd17..787a78e
--- a/drivers/usb/gadget/g_ffs.c
+++ b/drivers/usb/gadget/g_ffs.c
@@@ -410,10 -416,10 +416,10 @@@ static int gfs_unbind(struct usb_compos
         * do...?
         */
        if (gfs_ether_setup)
-               gether_cleanup();
+               gether_cleanup(the_dev);
        gfs_ether_setup = false;
  
 -      for (i = func_num; --i; )
 +      for (i = func_num; i--; )
                if (ffs_tab[i].ffs_data)
                        functionfs_unbind(ffs_tab[i].ffs_data);
  
diff --cc drivers/usb/gadget/net2272.c
index 32524b63,ce450a1..f1e50a3
--- a/drivers/usb/gadget/net2272.c
+++ b/drivers/usb/gadget/net2272.c
@@@ -58,8 -58,7 +58,7 @@@ static const char * const ep_name[] = 
        "ep-a", "ep-b", "ep-c",
  };
  
- #define DMA_ADDR_INVALID      (~(dma_addr_t)0)
 -#ifdef CONFIG_USB_GADGET_NET2272_DMA
 +#ifdef CONFIG_USB_NET2272_DMA
  /*
   * use_dma: the NET2272 can use an external DMA controller.
   * Note that since there is no generic DMA api, some functions,
diff --cc drivers/usb/gadget/net2280.c
index 3bd0f99,e869188..fbd006a
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@@ -1924,7 -1920,7 +1920,6 @@@ static int net2280_start(struct usb_gad
  err_func:
        device_remove_file (&dev->pdev->dev, &dev_attr_function);
  err_unbind:
-       dev->gadget.dev.driver = NULL;
 -      driver->unbind (&dev->gadget);
        dev->driver = NULL;
        return retval;
  }
diff --cc drivers/usb/host/ehci-tegra.c
index 4f3cfb8,1d2488c..ed201ae
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@@ -770,19 -765,15 +770,17 @@@ static int tegra_ehci_probe(struct plat
        if (!irq) {
                dev_err(&pdev->dev, "Failed to get IRQ\n");
                err = -ENODEV;
 -              goto fail;
 +              goto fail_phy;
        }
  
        if (pdata->operating_mode == TEGRA_USB_OTG) {
                tegra->transceiver =
                        devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
-               if (!IS_ERR_OR_NULL(tegra->transceiver))
+               if (!IS_ERR(tegra->transceiver))
                        otg_set_host(tegra->transceiver->otg, &hcd->self);
 +      } else {
 +              tegra->transceiver = ERR_PTR(-ENODEV);
        }
- #endif
  
        err = usb_add_hcd(hcd, irq, IRQF_SHARED);
        if (err) {
@@@ -801,11 -792,8 +799,9 @@@
        return err;
  
  fail:
- #ifdef CONFIG_USB_OTG_UTILS
-       if (!IS_ERR_OR_NULL(tegra->transceiver))
+       if (!IS_ERR(tegra->transceiver))
                otg_set_host(tegra->transceiver->otg, NULL);
- #endif
 +fail_phy:
        usb_phy_shutdown(hcd->phy);
  fail_io:
        clk_disable_unprepare(tegra->clk);

compile-tested this resolution with my machine's defconfig (which I
enable all possible USB drivers), omap2plus_defconfig and
tegra_defconfig.

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to