From 4bcbe0b63661b1df8e78d58270574d818b387d2c Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 8 Jun 2016 17:50:25 -0300 Subject: vl: Eliminate usb_enabled() This wrapper for machine_usb(current_machine) is not necessary, replace all usages of usb_enabled() with machine_usb(). Cc: Peter Maydell Cc: "Michael S. Tsirkin" Cc: Alexander Graf Cc: qemu-arm@nongnu.org Cc: qemu-ppc@nongnu.org Signed-off-by: Eduardo Habkost Reviewed-by: Marcel Apfelbaum Reviewed-by: Thomas Huth Message-id: 1465419025-21519-3-git-send-email-ehabkost@redhat.com Signed-off-by: Gerd Hoffmann --- vl.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index b0bcc255ee..45eff5661b 100644 --- a/vl.c +++ b/vl.c @@ -1072,11 +1072,6 @@ bool defaults_enabled(void) return has_defaults; } -bool usb_enabled(void) -{ - return machine_usb(current_machine); -} - #ifndef _WIN32 static int parse_add_fd(void *opaque, QemuOpts *opts, Error **errp) { @@ -1393,7 +1388,7 @@ static int usb_device_add(const char *devname) const char *p; #endif - if (!usb_enabled()) { + if (!machine_usb(current_machine)) { return -1; } @@ -1425,7 +1420,7 @@ static int usb_device_del(const char *devname) return -1; } - if (!usb_enabled()) { + if (!machine_usb(current_machine)) { return -1; } @@ -4501,7 +4496,7 @@ int main(int argc, char **argv, char **envp) } /* init USB devices */ - if (usb_enabled()) { + if (machine_usb(current_machine)) { if (foreach_device_config(DEV_USB, usb_parse) < 0) exit(1); } -- cgit v1.2.3