Save DriverObject pointer to device extension
Use INTERFACE_TYPE type instead of ULONG
Use OBJ_KERNEL_HANDLE when opening \Device\PhysicalMemory
Modified: trunk/reactos/drivers/video/videoprt/resource.c
Modified: trunk/reactos/drivers/video/videoprt/videoprt.c
Modified: trunk/reactos/drivers/video/videoprt/videoprt.h
_____
Modified: trunk/reactos/drivers/video/videoprt/resource.c
--- trunk/reactos/drivers/video/videoprt/resource.c 2005-06-03
16:04:40 UTC (rev 15748)
+++ trunk/reactos/drivers/video/videoprt/resource.c 2005-06-03
16:56:27 UTC (rev 15749)
@@ -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 @@
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 */
_____
Modified: trunk/reactos/drivers/video/videoprt/videoprt.c
--- trunk/reactos/drivers/video/videoprt/videoprt.c 2005-06-03
16:04:40 UTC (rev 15748)
+++ trunk/reactos/drivers/video/videoprt/videoprt.c 2005-06-03
16:56:27 UTC (rev 15749)
@@ -232,6 +232,7 @@
DeviceExtension =
(PVIDEO_PORT_DEVICE_EXTENSION)((*DeviceObject)->DeviceExtension);
DeviceExtension->DeviceNumber = DeviceNumber;
+ DeviceExtension->DriverObject = DriverObject;
DeviceExtension->PhysicalDeviceObject = PhysicalDeviceObject;
DeviceExtension->FunctionalDeviceObject = *DeviceObject;
DeviceExtension->DriverExtension = DriverExtension;
_____
Modified: trunk/reactos/drivers/video/videoprt/videoprt.h
--- trunk/reactos/drivers/video/videoprt/videoprt.h 2005-06-03
16:04:40 UTC (rev 15748)
+++ trunk/reactos/drivers/video/videoprt/videoprt.h 2005-06-03
16:56:27 UTC (rev 15749)
@@ -84,6 +84,7 @@
typedef struct _VIDEO_PORT_DEVICE_EXTENSTION
{
ULONG DeviceNumber;
+ PDRIVER_OBJECT DriverObject;
PDEVICE_OBJECT PhysicalDeviceObject;
PDEVICE_OBJECT FunctionalDeviceObject;
PDEVICE_OBJECT NextDeviceObject;
@@ -94,7 +95,7 @@
ULONG InterruptVector;
ULONG InterruptLevel;
BOOLEAN InterruptShared;
- ULONG AdapterInterfaceType;
+ INTERFACE_TYPE AdapterInterfaceType;
ULONG SystemIoBusNumber;
ULONG SystemIoSlotNumber;
LIST_ENTRY AddressMappingListHead;