Author: hpoussin
Date: Sun Mar 18 02:21:23 2007
New Revision: 26127
URL:
http://svn.reactos.org/svn/reactos?rev=26127&view=rev
Log:
Fix some warnings
Modified:
trunk/reactos/drivers/base/serial/circularbuffer.c
trunk/reactos/drivers/base/serial/cleanup.c
trunk/reactos/drivers/base/serial/close.c
trunk/reactos/drivers/base/serial/create.c
trunk/reactos/drivers/base/serial/devctrl.c
trunk/reactos/drivers/base/serial/info.c
trunk/reactos/drivers/base/serial/legacy.c
trunk/reactos/drivers/base/serial/misc.c
trunk/reactos/drivers/base/serial/pnp.c
trunk/reactos/drivers/base/serial/power.c
trunk/reactos/drivers/base/serial/rw.c
trunk/reactos/drivers/base/serial/serial.c
trunk/reactos/drivers/base/serial/serial.h
trunk/reactos/drivers/base/serial/serial.rbuild
Modified: trunk/reactos/drivers/base/serial/circularbuffer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/circul…
==============================================================================
--- trunk/reactos/drivers/base/serial/circularbuffer.c (original)
+++ trunk/reactos/drivers/base/serial/circularbuffer.c Sun Mar 18 02:21:23 2007
@@ -7,7 +7,6 @@
* PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
-#define NDEBUG
#include "serial.h"
NTSTATUS
Modified: trunk/reactos/drivers/base/serial/cleanup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/cleanu…
==============================================================================
--- trunk/reactos/drivers/base/serial/cleanup.c (original)
+++ trunk/reactos/drivers/base/serial/cleanup.c Sun Mar 18 02:21:23 2007
@@ -7,7 +7,6 @@
* PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
-#define NDEBUG
#include "serial.h"
NTSTATUS NTAPI
Modified: trunk/reactos/drivers/base/serial/close.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/close.…
==============================================================================
--- trunk/reactos/drivers/base/serial/close.c (original)
+++ trunk/reactos/drivers/base/serial/close.c Sun Mar 18 02:21:23 2007
@@ -7,7 +7,6 @@
* PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
-#define NDEBUG
#include "serial.h"
NTSTATUS NTAPI
Modified: trunk/reactos/drivers/base/serial/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/create…
==============================================================================
--- trunk/reactos/drivers/base/serial/create.c (original)
+++ trunk/reactos/drivers/base/serial/create.c Sun Mar 18 02:21:23 2007
@@ -7,7 +7,6 @@
* PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
-#define NDEBUG
#include "serial.h"
NTSTATUS NTAPI
Modified: trunk/reactos/drivers/base/serial/devctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/devctr…
==============================================================================
--- trunk/reactos/drivers/base/serial/devctrl.c (original)
+++ trunk/reactos/drivers/base/serial/devctrl.c Sun Mar 18 02:21:23 2007
@@ -7,7 +7,6 @@
* PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
-#define NDEBUG
#include "serial.h"
#define IO_METHOD_FROM_CTL_CODE(ctlCode) (ctlCode&0x00000003)
@@ -52,7 +51,7 @@
{
ULONG BaudRate;
USHORT divisor;
- PUCHAR ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
+ PUCHAR ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
NTSTATUS Status = STATUS_SUCCESS;
if (NewBaudRate == 0)
@@ -61,7 +60,7 @@
divisor = (USHORT)(BAUD_CLOCK / (CLOCKS_PER_BIT * NewBaudRate));
BaudRate = BAUD_CLOCK / (CLOCKS_PER_BIT * divisor);
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (NT_SUCCESS(Status))
{
UCHAR Lcr;
@@ -75,7 +74,7 @@
/* Switch back to normal registers */
WRITE_PORT_UCHAR(SER_LCR(ComPortBase), Lcr);
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
}
if (NT_SUCCESS(Status))
@@ -141,15 +140,15 @@
}
/* Update current parameters */
- ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (!NT_SUCCESS(Status))
return Status;
WRITE_PORT_UCHAR(SER_LCR(ComPortBase), Lcr);
/* Read junk out of RBR */
READ_PORT_UCHAR(SER_RBR(ComPortBase));
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (NT_SUCCESS(Status))
DeviceExtension->SerialLineControl = *NewSettings;
@@ -295,7 +294,7 @@
LengthIn = Stack->Parameters.DeviceIoControl.InputBufferLength;
LengthOut = Stack->Parameters.DeviceIoControl.OutputBufferLength;
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
- ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
+ ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
IoControlCode = Stack->Parameters.DeviceIoControl.IoControlCode;
SerialGetUserBuffers(Irp, IoControlCode, &BufferIn, &BufferOut);
@@ -318,12 +317,12 @@
DPRINT("IOCTL_SERIAL_CLR_DTR\n");
/* FIXME: If the handshake flow control of the device is configured to
* automatically use DTR, return STATUS_INVALID_PARAMETER */
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (NT_SUCCESS(Status))
{
DeviceExtension->MCR &= ~SR_MCR_DTR;
WRITE_PORT_UCHAR(SER_MCR(ComPortBase), DeviceExtension->MCR);
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
}
break;
}
@@ -332,12 +331,12 @@
DPRINT("IOCTL_SERIAL_CLR_RTS\n");
/* FIXME: If the handshake flow control of the device is configured to
* automatically use RTS, return STATUS_INVALID_PARAMETER */
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (NT_SUCCESS(Status))
{
DeviceExtension->MCR &= ~SR_MCR_RTS;
WRITE_PORT_UCHAR(SER_MCR(ComPortBase), DeviceExtension->MCR);
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
}
break;
}
@@ -557,11 +556,11 @@
if (DeviceExtension->UartType >= Uart16550A)
{
/* Clear also Uart FIFO */
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (NT_SUCCESS(Status))
{
WRITE_PORT_UCHAR(SER_FCR(ComPortBase), SR_FCR_CLEAR_RCVR);
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
}
}
KeReleaseSpinLock(&DeviceExtension->InputBufferLock, Irql);
@@ -574,11 +573,11 @@
if (DeviceExtension->UartType >= Uart16550A)
{
/* Clear also Uart FIFO */
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (NT_SUCCESS(Status))
{
WRITE_PORT_UCHAR(SER_FCR(ComPortBase), SR_FCR_CLEAR_XMIT);
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
}
}
KeReleaseSpinLock(&DeviceExtension->OutputBufferLock, Irql);
@@ -634,12 +633,12 @@
DPRINT("IOCTL_SERIAL_SET_DTR\n");
if (!(DeviceExtension->MCR & SR_MCR_DTR))
{
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (NT_SUCCESS(Status))
{
DeviceExtension->MCR |= SR_MCR_DTR;
WRITE_PORT_UCHAR(SER_MCR(ComPortBase), DeviceExtension->MCR);
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
}
}
else
@@ -653,11 +652,11 @@
Status = STATUS_INVALID_PARAMETER;
else
{
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (NT_SUCCESS(Status))
{
WRITE_PORT_UCHAR(SER_FCR(ComPortBase), (UCHAR)((*(PULONG)BufferIn) & 0xff));
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
}
}
break;
@@ -688,13 +687,13 @@
Status = STATUS_INVALID_PARAMETER;
else
{
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (NT_SUCCESS(Status))
{
pMCR = (PULONG)BufferIn;
DeviceExtension->MCR = (UCHAR)(*pMCR & 0xff);
WRITE_PORT_UCHAR(SER_MCR(ComPortBase), DeviceExtension->MCR);
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
}
}
break;
@@ -732,12 +731,12 @@
DPRINT("IOCTL_SERIAL_SET_RTS\n");
if (!(DeviceExtension->MCR & SR_MCR_RTS))
{
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (NT_SUCCESS(Status))
{
DeviceExtension->MCR |= SR_MCR_RTS;
WRITE_PORT_UCHAR(SER_MCR(ComPortBase), DeviceExtension->MCR);
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
}
}
else
Modified: trunk/reactos/drivers/base/serial/info.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/info.c…
==============================================================================
--- trunk/reactos/drivers/base/serial/info.c (original)
+++ trunk/reactos/drivers/base/serial/info.c Sun Mar 18 02:21:23 2007
@@ -7,7 +7,6 @@
* PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
-#define NDEBUG
#include "serial.h"
NTSTATUS NTAPI
Modified: trunk/reactos/drivers/base/serial/legacy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/legacy…
==============================================================================
--- trunk/reactos/drivers/base/serial/legacy.c (original)
+++ trunk/reactos/drivers/base/serial/legacy.c Sun Mar 18 02:21:23 2007
@@ -8,7 +8,6 @@
* Mark Junker (mjscod(a)gmx.de)
*/
-#define NDEBUG
#include "serial.h"
UART_TYPE
Modified: trunk/reactos/drivers/base/serial/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/misc.c…
==============================================================================
--- trunk/reactos/drivers/base/serial/misc.c (original)
+++ trunk/reactos/drivers/base/serial/misc.c Sun Mar 18 02:21:23 2007
@@ -8,8 +8,9 @@
*/
/* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
-#define NDEBUG
#include "serial.h"
+
+static IO_COMPLETION_ROUTINE ForwardIrpAndWaitCompletion;
static NTSTATUS NTAPI
ForwardIrpAndWaitCompletion(
@@ -36,7 +37,7 @@
KeInitializeEvent(&Event, NotificationEvent, FALSE);
IoCopyCurrentIrpStackLocationToNext(Irp);
- DPRINT("Calling lower device %p [%wZ]\n", LowerDevice,
&LowerDevice->DriverObject->DriverName);
+ DPRINT("Calling lower device %p\n", LowerDevice);
IoSetCompletionRoutine(Irp, ForwardIrpAndWaitCompletion, &Event, TRUE, TRUE, TRUE);
Status = IoCallDriver(LowerDevice, Irp);
@@ -78,7 +79,7 @@
NTSTATUS Status;
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)pDeviceExtension;
- ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
+ ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
KeAcquireSpinLock(&DeviceExtension->InputBufferLock, &Irql);
while (READ_PORT_UCHAR(SER_LSR(ComPortBase)) & SR_LSR_DATA_RECEIVED)
@@ -115,7 +116,7 @@
NTSTATUS Status;
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)pDeviceExtension;
- ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
+ ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
KeAcquireSpinLock(&DeviceExtension->OutputBufferLock, &Irql);
while (!IsCircularBufferEmpty(&DeviceExtension->OutputBuffer)
@@ -164,7 +165,7 @@
DeviceObject = (PDEVICE_OBJECT)ServiceContext;
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
- ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
+ ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
Iir = READ_PORT_UCHAR(SER_IIR(ComPortBase));
if (Iir == 0xff)
Modified: trunk/reactos/drivers/base/serial/pnp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/pnp.c?…
==============================================================================
--- trunk/reactos/drivers/base/serial/pnp.c (original)
+++ trunk/reactos/drivers/base/serial/pnp.c Sun Mar 18 02:21:23 2007
@@ -9,7 +9,6 @@
/* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
#define INITGUID
-#define NDEBUG
#include "serial.h"
NTSTATUS NTAPI
@@ -216,7 +215,7 @@
return STATUS_INSUFFICIENT_RESOURCES;
if (!Dirql)
return STATUS_INSUFFICIENT_RESOURCES;
- ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
+ ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
/* Test if we are trying to start the serial port used for debugging */
DPRINT1("KdComPort: %p\n", KdComPortInUse);
Modified: trunk/reactos/drivers/base/serial/power.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/power.…
==============================================================================
--- trunk/reactos/drivers/base/serial/power.c (original)
+++ trunk/reactos/drivers/base/serial/power.c Sun Mar 18 02:21:23 2007
@@ -7,7 +7,6 @@
* PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
-#define NDEBUG
#include "serial.h"
NTSTATUS NTAPI
Modified: trunk/reactos/drivers/base/serial/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/rw.c?r…
==============================================================================
--- trunk/reactos/drivers/base/serial/rw.c (original)
+++ trunk/reactos/drivers/base/serial/rw.c Sun Mar 18 02:21:23 2007
@@ -7,8 +7,9 @@
* PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
-#define NDEBUG
#include "serial.h"
+
+static IO_WORKITEM_ROUTINE SerialReadWorkItem;
static PVOID
SerialGetUserBuffer(IN PIRP Irp)
@@ -40,7 +41,7 @@
ASSERT(WorkItemData);
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
- ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
+ ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
Length = IoGetCurrentIrpStackLocation(Irp)->Parameters.Read.Length;
Buffer = SerialGetUserBuffer(Irp);
@@ -228,7 +229,7 @@
/* insufficient resources, we can't pend the Irp */
CHECKPOINT;
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (!NT_SUCCESS(Status))
{
ExFreePoolWithTag(WorkItemData, SERIAL_TAG);
@@ -237,7 +238,7 @@
ReadBytes(DeviceObject, Irp, WorkItemData);
Status = Irp->IoStatus.Status;
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
ByeBye:
Irp->IoStatus.Status = Status;
@@ -268,7 +269,7 @@
Length = Stack->Parameters.Write.Length;
Buffer = SerialGetUserBuffer(Irp);
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
- ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
+ ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
if (Stack->Parameters.Write.ByteOffset.QuadPart != 0 || Buffer == NULL)
{
@@ -276,7 +277,7 @@
goto ByeBye;
}
- Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
if (!NT_SUCCESS(Status))
goto ByeBye;
@@ -304,7 +305,7 @@
Information++;
}
KeReleaseSpinLock(&DeviceExtension->OutputBufferLock, Irql);
- IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
(PVOID)DeviceExtension->ComPort);
+ IoReleaseRemoveLock(&DeviceExtension->RemoveLock,
ULongToPtr(DeviceExtension->ComPort));
/* send bytes */
SerialSendByte(NULL, DeviceExtension, NULL, NULL);
Modified: trunk/reactos/drivers/base/serial/serial.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/serial…
==============================================================================
--- trunk/reactos/drivers/base/serial/serial.c (original)
+++ trunk/reactos/drivers/base/serial/serial.c Sun Mar 18 02:21:23 2007
@@ -7,8 +7,10 @@
* PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
-//#define NDEBUG
#include "serial.h"
+
+static DRIVER_UNLOAD DriverUnload;
+DRIVER_INITIALIZE DriverEntry;
static VOID NTAPI
DriverUnload(IN PDRIVER_OBJECT DriverObject)
Modified: trunk/reactos/drivers/base/serial/serial.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/serial…
==============================================================================
--- trunk/reactos/drivers/base/serial/serial.h (original)
+++ trunk/reactos/drivers/base/serial/serial.h Sun Mar 18 02:21:23 2007
@@ -227,31 +227,19 @@
/************************************ cleanup.c */
-NTSTATUS NTAPI
-SerialCleanup(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp);
+DRIVER_DISPATCH SerialCleanup;
/************************************ close.c */
-NTSTATUS NTAPI
-SerialClose(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp);
+DRIVER_DISPATCH SerialClose;
/************************************ create.c */
-NTSTATUS NTAPI
-SerialCreate(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp);
+DRIVER_DISPATCH SerialCreate;
/************************************ devctrl.c */
-NTSTATUS NTAPI
-SerialDeviceControl(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp);
+DRIVER_DISPATCH SerialDeviceControl;
NTSTATUS NTAPI
SerialSetBaudRate(
@@ -265,10 +253,7 @@
/************************************ info.c */
-NTSTATUS NTAPI
-SerialQueryInformation(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp);
+DRIVER_DISPATCH SerialQueryInformation;
/************************************ legacy.c */
@@ -283,10 +268,7 @@
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
-NTSTATUS NTAPI
-ForwardIrpAndForget(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp);
+DRIVER_DISPATCH ForwardIrpAndForget;
VOID NTAPI
SerialReceiveByte(
@@ -309,10 +291,7 @@
IN PVOID pIrp, // real type PIRP
IN PVOID Unused);
-BOOLEAN NTAPI
-SerialInterruptService(
- IN PKINTERRUPT Interrupt,
- IN OUT PVOID ServiceContext);
+KSERVICE_ROUTINE SerialInterruptService;
/************************************ pnp.c */
@@ -324,10 +303,7 @@
IN PULONG pComPortNumber OPTIONAL,
OUT PDEVICE_OBJECT* pFdo OPTIONAL);
-NTSTATUS NTAPI
-SerialAddDevice(
- IN PDRIVER_OBJECT DriverObject,
- IN PDEVICE_OBJECT Pdo);
+DRIVER_ADD_DEVICE SerialAddDevice;
NTSTATUS NTAPI
SerialPnpStartDevice(
@@ -335,26 +311,13 @@
IN PCM_RESOURCE_LIST ResourceList,
IN PCM_RESOURCE_LIST ResourceListTranslated);
-NTSTATUS NTAPI
-SerialPnp(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp);
+DRIVER_DISPATCH SerialPnp;
/************************************ power.c */
-NTSTATUS NTAPI
-SerialPower(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp);
+DRIVER_DISPATCH SerialPower;
/************************************ rw.c */
-NTSTATUS NTAPI
-SerialRead(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp);
-
-NTSTATUS NTAPI
-SerialWrite(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp);
+DRIVER_DISPATCH SerialRead;
+DRIVER_DISPATCH SerialWrite;
Modified: trunk/reactos/drivers/base/serial/serial.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/serial…
==============================================================================
--- trunk/reactos/drivers/base/serial/serial.rbuild (original)
+++ trunk/reactos/drivers/base/serial/serial.rbuild Sun Mar 18 02:21:23 2007
@@ -1,5 +1,6 @@
<module name="serial" type="kernelmodedriver"
installbase="system32/drivers" installname="serial.sys">
<define name="__USE_W32API" />
+ <define name="NDEBUG" />
<library>ntoskrnl</library>
<library>hal</library>
<file>circularbuffer.c</file>