ia64/xen-unstable

changeset 6958:db4a0526d4e5

Use DevController.allocateDeviceID rather than using a local variable.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Mon Sep 19 13:44:05 2005 +0100 (2005-09-19)
parents 951c8ee275b7
children adbe7d45472b
files tools/python/xen/xend/server/usbif.py
line diff
     1.1 --- a/tools/python/xen/xend/server/usbif.py	Mon Sep 19 13:41:41 2005 +0100
     1.2 +++ b/tools/python/xen/xend/server/usbif.py	Mon Sep 19 13:44:05 2005 +0100
     1.3 @@ -25,9 +25,6 @@
     1.4  from xen.xend.server.DevController import DevController
     1.5  
     1.6  
     1.7 -next_devid = 1
     1.8 -
     1.9 -
    1.10  class UsbifController(DevController):
    1.11      """USB device interface controller. Handles all USB devices
    1.12      for a domain.
    1.13 @@ -42,9 +39,4 @@ class UsbifController(DevController):
    1.14      def getDeviceDetails(self, _):
    1.15          """@see DevController.getDeviceDetails"""
    1.16  
    1.17 -        global next_devid
    1.18 -
    1.19 -        devid = next_devid
    1.20 -        next_devid += 1
    1.21 -
    1.22 -        return (devid, {}, {})
    1.23 +        return (self.allocateDeviceID(), {}, {})