Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a36c160c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB fixes from Greg KH:
 "Here are a few USB fixes for things that have people have reported
  issues with recently"

* tag 'usb-3.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: ohci-at91: fix irq and iomem resource retrieval
  usb: phy: fix driver dependencies
  phy: kconfig: add depends on "USB_PHY" to OMAP_USB2 and TWL4030_USB
  drivers: phy: tweaks to phy_create()
  drivers: phy: Fix memory leak
  xhci: Limit the spurious wakeup fix only to HP machines
  usb: chipidea: fix nobody cared IRQ when booting with host role
  usb: chipidea: host: Only disable the vbus regulator if it is not NULL
  usb: serial: zte_ev: move support for ZTE AC2726 from zte_ev back to option
  usb: cdc-wdm: manage_power should always set needs_remote_wakeup
  usb: phy-tegra-usb.c: wrong pointer check for remap UTMI
  usb: phy: twl6030-usb: signedness bug in twl6030_readb()
  usb: dwc3: power off usb phy in error path
  usb: dwc3: invoke phy_resume after phy_init
parents e5233658 fb5f1834
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ config PHY_EXYNOS_MIPI_VIDEO
config OMAP_USB2
	tristate "OMAP USB2 PHY Driver"
	depends on ARCH_OMAP2PLUS
	depends on USB_PHY
	select GENERIC_PHY
	select USB_PHY
	select OMAP_CONTROL_USB
	help
	  Enable this to support the transceiver that is part of SOC. This
@@ -36,8 +36,8 @@ config OMAP_USB2
config TWL4030_USB
	tristate "TWL4030 USB Transceiver Driver"
	depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS
	depends on USB_PHY
	select GENERIC_PHY
	select USB_PHY
	help
	  Enable this to support the USB OTG transceiver on TWL4030
	  family chips (including the TWL5030 and TPS659x0 devices).
+10 −16
Original line number Diff line number Diff line
@@ -437,23 +437,18 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops,
	int id;
	struct phy *phy;

	if (!dev) {
		dev_WARN(dev, "no device provided for PHY\n");
		ret = -EINVAL;
		goto err0;
	}
	if (WARN_ON(!dev))
		return ERR_PTR(-EINVAL);

	phy = kzalloc(sizeof(*phy), GFP_KERNEL);
	if (!phy) {
		ret = -ENOMEM;
		goto err0;
	}
	if (!phy)
		return ERR_PTR(-ENOMEM);

	id = ida_simple_get(&phy_ida, 0, 0, GFP_KERNEL);
	if (id < 0) {
		dev_err(dev, "unable to get id\n");
		ret = id;
		goto err0;
		goto free_phy;
	}

	device_initialize(&phy->dev);
@@ -468,11 +463,11 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops,

	ret = dev_set_name(&phy->dev, "phy-%s.%d", dev_name(dev), id);
	if (ret)
		goto err1;
		goto put_dev;

	ret = device_add(&phy->dev);
	if (ret)
		goto err1;
		goto put_dev;

	if (pm_runtime_enabled(dev)) {
		pm_runtime_enable(&phy->dev);
@@ -481,12 +476,11 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops,

	return phy;

err1:
	ida_remove(&phy_ida, phy->id);
put_dev:
	put_device(&phy->dev);
	ida_remove(&phy_ida, phy->id);
free_phy:
	kfree(phy);

err0:
	return ERR_PTR(ret);
}
EXPORT_SYMBOL_GPL(phy_create);
+4 −0
Original line number Diff line number Diff line
@@ -642,6 +642,10 @@ static int ci_hdrc_probe(struct platform_device *pdev)
			: CI_ROLE_GADGET;
	}

	/* only update vbus status for peripheral */
	if (ci->role == CI_ROLE_GADGET)
		ci_handle_vbus_change(ci);

	ret = ci_role_start(ci, ci->role);
	if (ret) {
		dev_err(dev, "can't start %s role\n", ci_role(ci)->name);
+2 −1
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ static int host_start(struct ci_hdrc *ci)
	return ret;

disable_reg:
	if (ci->platdata->reg_vbus)
		regulator_disable(ci->platdata->reg_vbus);

put_hcd:
+0 −3
Original line number Diff line number Diff line
@@ -1795,9 +1795,6 @@ static int udc_start(struct ci_hdrc *ci)
	pm_runtime_no_callbacks(&ci->gadget.dev);
	pm_runtime_enable(&ci->gadget.dev);

	/* Update ci->vbus_active */
	ci_handle_vbus_change(ci);

	return retval;

destroy_eps:
Loading