diff options
author | David Rientjes <rientjes@google.com> | 2013-04-07 17:11:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-08 12:08:35 -0400 |
commit | 75bfe23a36fc47dd95c5216b48caaf1fa9c55a65 (patch) | |
tree | 0c37f3c6b69609c70b9e91a1d0563b4a554810ad /drivers/usb | |
parent | 197c58f624bfb98d3f7f381e57b5d09b2360266f (diff) |
usb, gadget: use appropriate warning accessors
Use the appropriate WARN() and WARN_ON() accessors to avoid a build error
when CONFIG_BUG=n:
drivers/usb/gadget/configfs.c: In function 'config_usb_cfg_unlink':
drivers/usb/gadget/configfs.c:442:2: error: implicit declaration of function '__WARN_printf'
drivers/usb/gadget/configfs.c: In function 'configfs_do_nothing':
drivers/usb/gadget/configfs.c:733:2: error: implicit declaration of function '__WARN'
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/configfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index a34633a898a1..3d5cfc9c2c78 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c | |||
@@ -439,7 +439,7 @@ static int config_usb_cfg_unlink( | |||
439 | } | 439 | } |
440 | } | 440 | } |
441 | mutex_unlock(&gi->lock); | 441 | mutex_unlock(&gi->lock); |
442 | __WARN_printf("Unable to locate function to unbind\n"); | 442 | WARN(1, "Unable to locate function to unbind\n"); |
443 | return 0; | 443 | return 0; |
444 | } | 444 | } |
445 | 445 | ||
@@ -730,7 +730,7 @@ USB_CONFIG_STRINGS_LANG(gadget_strings, gadget_info); | |||
730 | 730 | ||
731 | static int configfs_do_nothing(struct usb_composite_dev *cdev) | 731 | static int configfs_do_nothing(struct usb_composite_dev *cdev) |
732 | { | 732 | { |
733 | __WARN(); | 733 | WARN_ON(1); |
734 | return -EINVAL; | 734 | return -EINVAL; |
735 | } | 735 | } |
736 | 736 | ||