diff options
author | Roman Alyautdin <ralyautdin@dev.rtsoft.ru> | 2015-10-12 10:14:32 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-10-16 11:26:22 -0400 |
commit | 3bbafac83775425d0abb68cf9837ee3ca36adb42 (patch) | |
tree | 29d5796303b1fabab257e67c865764cd8e707a26 /drivers/usb/musb/musb_core.h | |
parent | 91c42b0da8e353697c9b49fe541056c5d0518c49 (diff) |
usb: musb: core: add common method of getting vbus status
Fix musb_platform_get_vbus_status return value in case of platform
implementation is not defined, bringing expected behaviour of
musb_platform_get wrapper. Add musb_vbus_show default method to determine
VBUS status in case platform method is not defined.
Signed-off-by: Roman Alyautdin <ralyautdin@dev.rtsoft.ru>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_core.h')
-rw-r--r-- | drivers/usb/musb/musb_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 4b886d0f6bdf..2337d7a7d62d 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h | |||
@@ -579,7 +579,7 @@ static inline int musb_platform_recover(struct musb *musb) | |||
579 | static inline int musb_platform_get_vbus_status(struct musb *musb) | 579 | static inline int musb_platform_get_vbus_status(struct musb *musb) |
580 | { | 580 | { |
581 | if (!musb->ops->vbus_status) | 581 | if (!musb->ops->vbus_status) |
582 | return 0; | 582 | return -EINVAL; |
583 | 583 | ||
584 | return musb->ops->vbus_status(musb); | 584 | return musb->ops->vbus_status(musb); |
585 | } | 585 | } |