Now drivers (like NVIDIA Tegra USB PHY for example) will be able to benefit from the resource-managed variant, making driver's code a bit cleaner.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -55,12 +55,23 @@ · 54 unmodified lines | ||
| 55 | 55 | #if IS_ENABLED(CONFIG_USB_ULPI) |
| 56 | 56 | struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, |
| 57 | 57 | unsigned int flags); |
| 58 | + | |
| 59 | +struct usb_phy *devm_otg_ulpi_create(struct device *dev, | |
| 60 | + struct usb_phy_io_ops *ops, | |
| 61 | + unsigned int flags); | |
| 58 | 62 | #else |
| 59 | 63 | static inline struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, |
| 60 | 64 | unsigned int flags) |
| 61 | 65 | { |
| 62 | 66 | return NULL; |
| 63 | 67 | } |
| 68 | + | |
| 69 | +static inline struct usb_phy *devm_otg_ulpi_create(struct device *dev, | |
| 70 | + struct usb_phy_io_ops *ops, | |
| 71 | + unsigned int flags) | |
| 72 | +{ | |
| 73 | + return NULL; | |
| 74 | +} | |
| 64 | 75 | #endif |
| 65 | 76 | |
| 66 | 77 | #ifdef CONFIG_USB_ULPI_VIEWPORT |