Skip to content

Commit

Permalink
USB: Use usb_disabled() consistently
Browse files Browse the repository at this point in the history
At few places we have used usb_disabled() and at other places used 'nousb'
directly. Lets be consistent and use usb_disabled();

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Viresh Kumar authored and Greg Kroah-Hartman committed Mar 26, 2015
1 parent 66e3e59 commit 1da47f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/core/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ static void usb_debugfs_cleanup(void)
static int __init usb_init(void)
{
int retval;
if (nousb) {
if (usb_disabled()) {
pr_info("%s: USB support disabled\n", usbcore_name);
return 0;
}
Expand Down Expand Up @@ -1102,7 +1102,7 @@ static int __init usb_init(void)
static void __exit usb_exit(void)
{
/* This will matter if shutdown/reboot does exitcalls. */
if (nousb)
if (usb_disabled())
return;

usb_deregister_device_driver(&usb_generic_driver);
Expand Down

0 comments on commit 1da47f5

Please sign in to comment.