mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Use DevController.allocateDeviceID rather than using a local variable.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
0c0fe2fcc7
commit
60603ce320
1 file changed
+1
-9
@@ -25,9 +25,6 @@
|
||||
from xen.xend.server.DevController import DevController
|
||||
|
||||
|
||||
next_devid = 1
|
||||
|
||||
|
||||
class UsbifController(DevController):
|
||||
"""USB device interface controller. Handles all USB devices
|
||||
for a domain.
|
||||
@@ -42,9 +39,4 @@ class UsbifController(DevController):
|
||||
def getDeviceDetails(self, _):
|
||||
"""@see DevController.getDeviceDetails"""
|
||||
|
||||
global next_devid
|
||||
|
||||
devid = next_devid
|
||||
next_devid += 1
|
||||
|
||||
return (devid, {}, {})
|
||||
return (self.allocateDeviceID(), {}, {})
|
||||