]> git.proxmox.com Git - mirror_qemu.git/blobdiff - vl.c
vl: Eliminate usb_enabled()
[mirror_qemu.git] / vl.c
diff --git a/vl.c b/vl.c
index b0bcc255ee9a56e6002c3e76054b0a077091d579..45eff5661b207af1ae8d165540cb0b06fafe8e79 100644 (file)
--- 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);
     }