-Fix compilation with msc

svn path=/branches/cmake-bringup/; revision=50713
This commit is contained in:
Giannis Adamopoulos 2011-02-15 17:12:36 +00:00
parent a7014019f3
commit d372ef8b22
6 changed files with 44 additions and 29 deletions

View file

@ -42,13 +42,13 @@ static int acpi_button_add (struct acpi_device *device);
static int acpi_button_remove (struct acpi_device *device, int type);
static struct acpi_driver acpi_button_driver = {
.name = ACPI_BUTTON_DRIVER_NAME,
.class = ACPI_BUTTON_CLASS,
.ids = "ACPI_FPB,ACPI_FSB,PNP0C0D,PNP0C0C,PNP0C0E",
.ops = {
.add = acpi_button_add,
.remove = acpi_button_remove,
},
{0,0},
ACPI_BUTTON_DRIVER_NAME,
ACPI_BUTTON_CLASS,
0,
0,
"ACPI_FPB,ACPI_FSB,PNP0C0D,PNP0C0C,PNP0C0E",
{acpi_button_add,acpi_button_remove}
};
struct acpi_button {

View file

@ -64,14 +64,13 @@ static int acpi_power_remove (struct acpi_device *device, int type);
static int acpi_power_resume(struct acpi_device *device, int state);
static struct acpi_driver acpi_power_driver = {
.name = ACPI_POWER_DRIVER_NAME,
.class = ACPI_POWER_CLASS,
.ids = ACPI_POWER_HID,
.ops = {
.add = acpi_power_add,
.remove = acpi_power_remove,
.resume = acpi_power_resume,
},
{0,0},
ACPI_POWER_DRIVER_NAME,
ACPI_POWER_CLASS,
0,
0,
ACPI_POWER_HID,
{acpi_power_add, acpi_power_remove, NULL, NULL, acpi_power_resume}
};
struct acpi_power_reference {

View file

@ -48,13 +48,13 @@ static int acpi_system_remove (struct acpi_device *device, int type);
ACPI_STATUS acpi_suspend (UINT32 state);
static struct acpi_driver acpi_system_driver = {
.name = ACPI_SYSTEM_DRIVER_NAME,
.class = ACPI_SYSTEM_CLASS,
.ids = ACPI_SYSTEM_HID,
.ops = {
.add = acpi_system_add,
.remove = acpi_system_remove
},
{0,0},
ACPI_SYSTEM_DRIVER_NAME,
ACPI_SYSTEM_CLASS,
0,
0,
ACPI_SYSTEM_HID,
{acpi_system_add, acpi_system_remove}
};
struct acpi_system

View file

@ -12,6 +12,13 @@
#define NDEBUG
#include <debug.h>
NTSTATUS
NTAPI
DriverEntry (
PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath
);
#ifdef ALLOC_PRAGMA
#pragma alloc_text (INIT, DriverEntry)
#pragma alloc_text (PAGE, Bus_AddDevice)

View file

@ -67,6 +67,8 @@ AcpiOsRemoveInterruptHandler (
ACPI_STATUS
AcpiOsInitialize (void)
{
UINT32 i;
DPRINT("AcpiOsInitialize called\n");
#ifndef NDEBUG
@ -75,8 +77,6 @@ AcpiOsInitialize (void)
AcpiDbgLayer = 0xFFFFFFFF;
#endif
UINT32 i;
for (i = 0; i < NUM_SEMAPHORES; i++)
{
AcpiGbl_Semaphores[i].OsHandle = NULL;
@ -209,10 +209,11 @@ void *
AcpiOsAcquireObject (
ACPI_CACHE_T *Cache)
{
void* ptr;
PNPAGED_LOOKASIDE_LIST List = (PNPAGED_LOOKASIDE_LIST)Cache;
DPRINT("AcpiOsAcquireObject from %p\n", Cache);
void* ptr =
ExAllocateFromNPagedLookasideList(List);
ptr = ExAllocateFromNPagedLookasideList(List);
ASSERT(ptr);
RtlZeroMemory(ptr,List->L.Size);
@ -692,8 +693,10 @@ AcpiOsExecute (
UINT64
AcpiOsGetTimer (void)
{
DPRINT("AcpiOsGetTimer\n");
LARGE_INTEGER Timer;
DPRINT("AcpiOsGetTimer\n");
KeQueryTickCount(&Timer);
return Timer.QuadPart;
@ -758,9 +761,10 @@ ACPI_PHYSICAL_ADDRESS
AcpiOsGetRootPointer (
void)
{
DPRINT("AcpiOsGetRootPointer\n");
ACPI_PHYSICAL_ADDRESS pa = 0;
DPRINT("AcpiOsGetRootPointer\n");
AcpiFindRootPointer(&pa);
return pa;
}

View file

@ -10,11 +10,16 @@
#define NDEBUG
#include <debug.h>
NTSTATUS
Bus_PlugInDevice (
struct acpi_device *Device,
PFDO_DEVICE_DATA FdoData
);
#ifdef ALLOC_PRAGMA
#pragma alloc_text (PAGE, Bus_PnP)
#pragma alloc_text (PAGE, Bus_PlugInDevice)
#pragma alloc_text (PAGE, Bus_InitializePdo)
#pragma alloc_text (PAGE, Bus_UnPlugDevice)
#pragma alloc_text (PAGE, Bus_DestroyPdo)
#pragma alloc_text (PAGE, Bus_FDO_PnP)
#pragma alloc_text (PAGE, Bus_StartFdo)