aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/phy/phy.c')
-rw-r--r--drivers/usb/phy/phy.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
index 045cd309367a..b4066a001ba0 100644
--- a/drivers/usb/phy/phy.c
+++ b/drivers/usb/phy/phy.c
@@ -191,7 +191,9 @@ struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev,
191 191
192 phy = __of_usb_find_phy(node); 192 phy = __of_usb_find_phy(node);
193 if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { 193 if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) {
194 phy = ERR_PTR(-EPROBE_DEFER); 194 if (!IS_ERR(phy))
195 phy = ERR_PTR(-EPROBE_DEFER);
196
195 devres_free(ptr); 197 devres_free(ptr);
196 goto err1; 198 goto err1;
197 } 199 }
@@ -444,3 +446,15 @@ int usb_bind_phy(const char *dev_name, u8 index,
444 return 0; 446 return 0;
445} 447}
446EXPORT_SYMBOL_GPL(usb_bind_phy); 448EXPORT_SYMBOL_GPL(usb_bind_phy);
449
450/**
451 * usb_phy_set_event - set event to phy event
452 * @x: the phy returned by usb_get_phy();
453 *
454 * This sets event to phy event
455 */
456void usb_phy_set_event(struct usb_phy *x, unsigned long event)
457{
458 x->last_event = event;
459}
460EXPORT_SYMBOL_GPL(usb_phy_set_event);