- Update to r53061
[reactos.git] / drivers / input / sermouse / createclose.c
1 /*
2 * PROJECT: ReactOS Serial mouse driver
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: drivers/input/sermouse/createclose.c
5 * PURPOSE: IRP_MJ_CREATE and IRP_MJ_CLOSE operations
6 * PROGRAMMERS: Copyright 2005-2006 Hervé Poussineau (hpoussin@reactos.org)
7 */
8
9 #include "sermouse.h"
10
11 NTSTATUS NTAPI
12 SermouseCreate(
13 IN PDEVICE_OBJECT DeviceObject,
14 IN PIRP Irp)
15 {
16 TRACE_(SERMOUSE, "IRP_MJ_CREATE\n");
17 ASSERT(((PSERMOUSE_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->PnpState == dsStarted);
18
19 Irp->IoStatus.Status = STATUS_SUCCESS;
20 Irp->IoStatus.Information = 0;
21 IoCompleteRequest(Irp, IO_NO_INCREMENT);
22 return STATUS_SUCCESS;
23 }
24
25 NTSTATUS NTAPI
26 SermouseClose(
27 IN PDEVICE_OBJECT DeviceObject,
28 IN PIRP Irp)
29 {
30 TRACE_(SERMOUSE, "IRP_MJ_CLOSE\n");
31
32 Irp->IoStatus.Status = STATUS_SUCCESS;
33 Irp->IoStatus.Information = 0;
34 IoCompleteRequest(Irp, IO_NO_INCREMENT);
35 return STATUS_SUCCESS;
36 }
37
38 NTSTATUS NTAPI
39 SermouseCleanup(
40 IN PDEVICE_OBJECT DeviceObject,
41 IN PIRP Irp)
42 {
43 TRACE_(SERMOUSE, "IRP_MJ_CLEANUP\n");
44
45 Irp->IoStatus.Status = STATUS_SUCCESS;
46 Irp->IoStatus.Information = 0;
47 IoCompleteRequest(Irp, IO_NO_INCREMENT);
48 return STATUS_SUCCESS;
49 }