ReactOS 0.4.16-dev-1946-g52006dd
misc.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: Parallel Port Function Driver
4 * FILE: drivers/parallel/parport/misc.c
5 * PURPOSE: Miscellaneous functions
6 */
7
8#include "parport.h"
9#define NDEBUG
10#include <debug.h>
11
12/* FUNCTIONS ****************************************************************/
13
17 IN PIRP Irp)
18{
19 PDEVICE_OBJECT LowerDevice;
20
21 if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO)
22 LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice;
23 else
24 LowerDevice = ((PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->AttachedFdo;
25 ASSERT(LowerDevice);
26
28 return IoCallDriver(LowerDevice, Irp);
29}
30
31
34{
35 ASSERT(Irp);
36
37 if (Irp->MdlAddress)
38 return Irp->MdlAddress;
39 else
40 return Irp->AssociatedIrp.SystemBuffer;
41}
42
43/* EOF */
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
struct _PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION
PVOID GetUserBuffer(IN PIRP Irp)
Definition: misc.c:33
DRIVER_DISPATCH ForwardIrpAndForget
Definition: i8042prt.h:341
#define ASSERT(a)
Definition: mode.c:44
#define IoSkipCurrentIrpStackLocation(Irp)
Definition: ntifs_ex.h:421
#define IoCallDriver
Definition: irp.c:1225
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2061