diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index ca105a3d605144543630b22694f9f832bdc77436..0a5e731d83edc2b43d3d9f23592f78fae07c6270 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -335,8 +335,6 @@ struct _virNodeDeviceObj { virMutex lock; virNodeDeviceDefPtr def; /* device definition */ - void *privateData; /* driver-specific private data */ - void (*privateFree)(void *data); /* destructor for private data */ }; diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index e00009237c41e9065765789135329d23f0e899f3..e78f451df8b1b518e00eb70267f1ae089acbeba4 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -246,8 +246,6 @@ virNodeDeviceObjFree(virNodeDeviceObjPtr dev) return; virNodeDeviceDefFree(dev->def); - if (dev->privateFree) - (*dev->privateFree)(dev->privateData); virMutexDestroy(&dev->lock); diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_device_hal.c index 83cda9bdc61400349b6a7e95e9eaf8eba2d16002..f468e42d0e32cd497ff6abf0c610caa0097057c1 100644 --- a/src/node_device/node_device_hal.c +++ b/src/node_device/node_device_hal.c @@ -52,8 +52,6 @@ VIR_LOG_INIT("node_device.node_device_hal"); #define DRV_STATE_HAL_CTX(ds) ((LibHalContext *)((ds)->privateData)) -#define NODE_DEV_UDI(obj) ((const char *)((obj)->privateData) - static const char * hal_name(const char *udi) @@ -446,12 +444,6 @@ gather_capabilities(LibHalContext *ctx, const char *udi, return rv; } -static void -free_udi(void *udi) -{ - VIR_FREE(udi); -} - static void dev_create(const char *udi) { @@ -462,12 +454,8 @@ dev_create(const char *udi) virNodeDeviceDefPtr objdef; const char *name = hal_name(udi); int rv; - char *privData; char *devicePath = NULL; - if (VIR_STRDUP(privData, udi) < 0) - return; - nodeDeviceLock(); ctx = DRV_STATE_HAL_CTX(driver); @@ -500,8 +488,6 @@ dev_create(const char *udi) } objdef = virNodeDeviceObjGetDef(dev); - dev->privateData = privData; - dev->privateFree = free_udi; objdef->sysfs_path = devicePath; virNodeDeviceObjUnlock(dev); @@ -512,7 +498,6 @@ dev_create(const char *udi) failure: VIR_DEBUG("FAILED TO ADD dev %s", name); cleanup: - VIR_FREE(privData); virNodeDeviceDefFree(def); nodeDeviceUnlock(); }