usb: phy: generic: allow multiples calls to usb_phy_generic_register()

it's now very easy to return a platform_device pointer
and have the caller pass it as argument when calling
usb_phy_generic_unregister().

Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Felipe Balbi
2014-04-16 16:16:33 -05:00
parent e741e637a8
commit 2f36ff6915
6 changed files with 40 additions and 27 deletions

View File

@@ -15,14 +15,15 @@ struct usb_phy_generic_platform_data {
#if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
/* sometimes transceivers are accessed only through e.g. ULPI */
extern void usb_phy_generic_register(void);
extern void usb_phy_generic_unregister(void);
extern struct platform_device *usb_phy_generic_register(void);
extern void usb_phy_generic_unregister(struct platform_device *);
#else
static inline void usb_phy_generic_register(void)
static inline struct platform_device *usb_phy_generic_register(void)
{
return NULL;
}
static inline void usb_phy_generic_unregister(void)
static inline void usb_phy_generic_unregister(struct platform_device *pdev)
{
}
#endif