[ros-diffs] [cfinck] 33357: Filip Navara: - Only increment VideoPortDeviceNumber, when IntVideoPortCreateAdapterDeviceObject and IntVideoPortFindAdapter succeeded. This fixes loading the CL54xx miniport driver. But it still isn't usable, because win32k cannot find the DDI driver for it.

cfinck at svn.reactos.org cfinck at svn.reactos.org
Wed May 7 23:51:40 CEST 2008


Author: cfinck
Date: Wed May  7 16:51:39 2008
New Revision: 33357

URL: http://svn.reactos.org/svn/reactos?rev=33357&view=rev
Log:
Filip Navara:
- Only increment VideoPortDeviceNumber, when IntVideoPortCreateAdapterDeviceObject and IntVideoPortFindAdapter succeeded.
  This fixes loading the CL54xx miniport driver. But it still isn't usable, because win32k cannot find the DDI driver for it.

Modified:
    trunk/reactos/drivers/video/videoprt/dispatch.c
    trunk/reactos/drivers/video/videoprt/videoprt.c
    trunk/reactos/drivers/video/videoprt/videoprt.h

Modified: trunk/reactos/drivers/video/videoprt/dispatch.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/dispatch.c?rev=33357&r1=33356&r2=33357&view=diff
==============================================================================
--- trunk/reactos/drivers/video/videoprt/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/dispatch.c [iso-8859-1] Wed May  7 16:51:39 2008
@@ -81,6 +81,8 @@
       DriverExtension,
       PhysicalDeviceObject,
       &DeviceObject);
+   if (NT_SUCCESS(Status))
+      VideoPortDeviceNumber++;
 
    return Status;
 }

Modified: trunk/reactos/drivers/video/videoprt/videoprt.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/videoprt.c?rev=33357&r1=33356&r2=33357&view=diff
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.c [iso-8859-1] Wed May  7 16:51:39 2008
@@ -187,7 +187,7 @@
     * object names and symlinks.
     */
 
-   DeviceNumber = VideoPortDeviceNumber++;
+   DeviceNumber = VideoPortDeviceNumber;
    if (DeviceNumber == 0xFFFFFFFF)
    {
       WARN_(VIDEOPRT, "Can't find free device number\n");
@@ -721,6 +721,8 @@
          return Status;
       Status = IntVideoPortFindAdapter(DriverObject, DriverExtension, DeviceObject);
       INFO_(VIDEOPRT, "IntVideoPortFindAdapter returned 0x%x\n", Status);
+      if (NT_SUCCESS(Status))
+         VideoPortDeviceNumber++;
       return Status;
    }
    else

Modified: trunk/reactos/drivers/video/videoprt/videoprt.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/videoprt.h?rev=33357&r1=33356&r2=33357&view=diff
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.h [iso-8859-1] Wed May  7 16:51:39 2008
@@ -196,6 +196,7 @@
 
 extern ULONG CsrssInitialized;
 extern PKPROCESS Csrss;
+extern ULONG VideoPortDeviceNumber;
 
 VOID FASTCALL
 IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState);



More information about the Ros-diffs mailing list