Save DriverObject pointer to device extension

Use INTERFACE_TYPE type instead of ULONG
Use OBJ_KERNEL_HANDLE when opening \Device\PhysicalMemory

svn path=/trunk/; revision=15749
This commit is contained in:
Hervé Poussineau 2005-06-03 16:56:27 +00:00
parent 2bb29cba04
commit 47418050f9
3 changed files with 5 additions and 3 deletions

View file

@ -1,7 +1,7 @@
/*
* VideoPort driver
*
* Copyright (C) 2002, 2003, 2004 ReactOS Team
* Copyright (C) 2002 - 2005 ReactOS Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -43,7 +43,7 @@ IntVideoPortMapPhysicalMemory(
RtlInitUnicodeString(&UnicodeString, L"\\Device\\PhysicalMemory");
InitializeObjectAttributes(&ObjAttribs,
&UnicodeString,
OBJ_CASE_INSENSITIVE/* | OBJ_KERNEL_HANDLE*/,
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
NULL, NULL);
/* Open physical memory section */

View file

@ -232,6 +232,7 @@ IntVideoPortCreateAdapterDeviceObject(
DeviceExtension = (PVIDEO_PORT_DEVICE_EXTENSION)((*DeviceObject)->DeviceExtension);
DeviceExtension->DeviceNumber = DeviceNumber;
DeviceExtension->DriverObject = DriverObject;
DeviceExtension->PhysicalDeviceObject = PhysicalDeviceObject;
DeviceExtension->FunctionalDeviceObject = *DeviceObject;
DeviceExtension->DriverExtension = DriverExtension;

View file

@ -84,6 +84,7 @@ typedef struct _VIDEO_PORT_DRIVER_EXTENSION
typedef struct _VIDEO_PORT_DEVICE_EXTENSTION
{
ULONG DeviceNumber;
PDRIVER_OBJECT DriverObject;
PDEVICE_OBJECT PhysicalDeviceObject;
PDEVICE_OBJECT FunctionalDeviceObject;
PDEVICE_OBJECT NextDeviceObject;
@ -94,7 +95,7 @@ typedef struct _VIDEO_PORT_DEVICE_EXTENSTION
ULONG InterruptVector;
ULONG InterruptLevel;
BOOLEAN InterruptShared;
ULONG AdapterInterfaceType;
INTERFACE_TYPE AdapterInterfaceType;
ULONG SystemIoBusNumber;
ULONG SystemIoSlotNumber;
LIST_ENTRY AddressMappingListHead;