@@ -26,9 +26,11 @@ static int libxl__device_vkb_setdefault(libxl__gc *gc, uint32_t domid,
return libxl__resolve_domid(gc, vkb->backend_domname, &vkb->backend_domid);
}
-static int libxl__device_vkb_dm_needed(libxl_device_vkb *vkb, uint32_t domid)
+static int libxl__device_vkb_dm_needed(void *e, uint32_t domid)
{
- return vkb->backend_type == LIBXL_VKB_BACKEND_QEMU;
+ libxl_device_vkb *elem = e;
+
+ return elem->backend_type == LIBXL_VKB_BACKEND_QEMU;
}
static int libxl__set_xenstore_vkb(libxl__gc *gc, uint32_t domid,
@@ -327,7 +329,7 @@ LIBXL_DEFINE_DEVICE_REMOVE(vkb)
DEFINE_DEVICE_TYPE_STRUCT(vkb, VKBD,
.skip_attach = 1,
- .dm_needed = (device_dm_needed_fn_t)libxl__device_vkb_dm_needed,
+ .dm_needed = libxl__device_vkb_dm_needed,
.set_xenstore_config = (device_set_xenstore_config_fn_t)
libxl__set_xenstore_vkb,
.from_xenstore = (device_from_xenstore_fn_t)libxl__vkb_from_xenstore
Align code to match other usage of device_dm_needed_fn_t: recieve a void pointer, assign to expected type and use it accordingly. No functional change expected. Signed-off-by: Olaf Hering <olaf@aepfle.de> --- tools/libxl/libxl_vkb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)