Rename drivers to their right name
[reactos.git] / reactos / drivers / usb / cromwell / usbuhci / create.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS UHCI controller driver (Cromwell type)
4 * FILE: drivers/usb/cromwell/uhci/create.c
5 * PURPOSE: IRP_MJ_CREATE operations
6 *
7 * PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
8 */
9
10 #define NDEBUG
11 #include "uhci.h"
12
13 NTSTATUS STDCALL
14 UhciCreate(
15 IN PDEVICE_OBJECT DeviceObject,
16 IN PIRP Irp)
17 {
18 PIO_STACK_LOCATION Stack;
19 POHCI_DEVICE_EXTENSION DeviceExtension;
20 NTSTATUS Status;
21
22 DPRINT("UHCI: IRP_MJ_CREATE\n");
23 Stack = IoGetCurrentIrpStackLocation(Irp);
24 DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
25
26 if (Stack->Parameters.Create.Options & FILE_DIRECTORY_FILE)
27 {
28 CHECKPOINT;
29 Status = STATUS_NOT_A_DIRECTORY;
30 goto ByeBye;
31 }
32
33 InterlockedIncrement((PLONG)&DeviceExtension->DeviceOpened);
34 Status = STATUS_SUCCESS;
35
36 ByeBye:
37 Irp->IoStatus.Status = Status;
38 Irp->IoStatus.Information = 0;
39 IoCompleteRequest(Irp, IO_NO_INCREMENT);
40 return Status;
41 }