#ifndef __HV_H__
#define __HV_H__
-#include "osd.h"
+#include "include/osd.h"
-#include "HvTypes.h"
-#include "HvStatus.h"
+#include "include/HvTypes.h"
+#include "include/HvStatus.h"
//#include "HvVmApi.h"
//#include "HvKeApi.h"
//#include "HvMmApi.h"
//#include "HvCpuApi.h"
-#include "HvHalApi.h"
-#include "HvVpApi.h"
+#include "include/HvHalApi.h"
+#include "include/HvVpApi.h"
//#include "HvTrApi.h"
-#include "HvSynicApi.h"
+#include "include/HvSynicApi.h"
//#include "HvAmApi.h"
//#include "HvHkApi.h"
//#include "HvValApi.h"
-#include "HvHcApi.h"
-#include "HvPtApi.h"
+#include "include/HvHcApi.h"
+#include "include/HvPtApi.h"
enum
{
*
*/
+#define KERNEL_2_6_27
#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/sysctl.h>
-#include "logging.h"
-#include "vmbus.h"
+#include "include/logging.h"
+#include "include/vmbus.h"
//
// Defines
goto cleanup;
}
//strcpy(dev_ctx->device.bus_id, dev_ctx->device_obj.name);
- sprintf(dev_ctx->device.bus_id, "vmbus_0_0");
+ dev_set_name(&dev_ctx->device, "vmbus_0_0");
memcpy(&dev_ctx->class_id, &dev_ctx->device_obj.deviceType, sizeof(GUID));
memcpy(&dev_ctx->device_id, &dev_ctx->device_obj.deviceInstance, sizeof(GUID));
//
// Make sure we are not registered already
//
- if (child_device_ctx->device.bus_id[0] != '\0')
+ if (strlen(dev_name(&child_device_ctx->device)) != 0)
{
- DPRINT_ERR(VMBUS_DRV, "child device (%p) already registered - busid %s", child_device_ctx, child_device_ctx->device.bus_id);
+ DPRINT_ERR(VMBUS_DRV, "child device (%p) already registered - busid %s", child_device_ctx, dev_name(&child_device_ctx->device));
ret = -1;
goto Cleanup;
}
// Set the device bus id. Otherwise, device_register()will fail.
- sprintf(child_device_ctx->device.bus_id, "vmbus_0_%d", InterlockedIncrement(&device_num));
+ dev_set_name(&child_device_ctx->device, "vmbus_0_%d", InterlockedIncrement(&device_num));
// The new device belongs to this bus
child_device_ctx->device.bus = &g_vmbus_drv.bus; //device->dev.bus;
ret = device_ctx->probe_error = driver_ctx->probe(child_device);
if (ret != 0)
{
- DPRINT_ERR(VMBUS_DRV, "probe() failed for device %s (%p) on driver %s (%d)...", child_device->bus_id, child_device, child_device->driver->name, ret);
+ DPRINT_ERR(VMBUS_DRV, "probe() failed for device %s (%p) on driver %s (%d)...", dev_name(child_device), child_device, child_device->driver->name, ret);
#ifdef KERNEL_2_6_27
INIT_WORK(&device_ctx->probe_failed_work_item, vmbus_probe_failed_cb);