- Update to r53061
[reactos.git] / drivers / serial / serial / close.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: Serial port driver
4 * FILE: drivers/dd/serial/close.c
5 * PURPOSE: Serial IRP_MJ_CLOSE operations
6 *
7 * PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
8 */
9
10 #include "serial.h"
11
12 NTSTATUS NTAPI
13 SerialClose(
14 IN PDEVICE_OBJECT DeviceObject,
15 IN PIRP Irp)
16 {
17 PSERIAL_DEVICE_EXTENSION pDeviceExtension;
18
19 TRACE_(SERIAL, "IRP_MJ_CLOSE\n");
20 pDeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
21 pDeviceExtension->IsOpened = FALSE;
22
23 Irp->IoStatus.Information = 0;
24 Irp->IoStatus.Status = STATUS_SUCCESS;
25 IoCompleteRequest(Irp, IO_NO_INCREMENT);
26 return STATUS_SUCCESS;
27 }