diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-05-28 10:08:02 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-05-28 10:15:32 -0400 |
commit | 307c858bc245da5229b30186546590e1d472fc8f (patch) | |
tree | aa72910e9003be2955f79184d26bb733826f6c29 | |
parent | 94a715ed5c57e43f216a4fe85a3604a574c08515 (diff) |
usb: phy: add static inline wrapper for devm_usb_get_phy_by_node
The newly introduced devm_usb_get_phy_by_node function only has
an extern declaration, but no alternative for the case that
CONFIG_USB_PHY is disabled, which leads to a build error when
it is used anyway:
drivers/power/twl4030_charger.c: In function 'twl4030_bci_probe':
drivers/power/twl4030_charger.c:648:23: error: implicit declaration of function 'devm_usb_get_phy_by_node' [-Werror=implicit-function-declaration]
bci->transceiver = devm_usb_get_phy_by_node(
This adds the wrapper in the same way that we have one for
all other usb-phy API functions.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: e842b84c8e7 ("usb: phy: Add interface to get phy give of device_node.")
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | include/linux/usb/phy.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index 8ed1e29ef329..e39f251cf861 100644 --- a/include/linux/usb/phy.h +++ b/include/linux/usb/phy.h | |||
@@ -240,6 +240,12 @@ static inline struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, | |||
240 | return ERR_PTR(-ENXIO); | 240 | return ERR_PTR(-ENXIO); |
241 | } | 241 | } |
242 | 242 | ||
243 | static inline struct usb_phy *devm_usb_get_phy_by_node(struct device *dev, | ||
244 | struct device_node *node, struct notifier_block *nb) | ||
245 | { | ||
246 | return ERR_PTR(-ENXIO); | ||
247 | } | ||
248 | |||
243 | static inline void usb_put_phy(struct usb_phy *x) | 249 | static inline void usb_put_phy(struct usb_phy *x) |
244 | { | 250 | { |
245 | } | 251 | } |