Skip to content

Commit

Permalink
FilterStrategy: Simplify requests forwarding code
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
  • Loading branch information
Dmitry Fleytman committed Dec 24, 2015
1 parent 32aadcb commit 00cf4cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
10 changes: 0 additions & 10 deletions UsbDk/FilterStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@ void CUsbDkFilterStrategy::ForwardRequest(WDFREQUEST Request)
}
}

void CUsbDkFilterStrategy::IoDeviceControl(WDFREQUEST Request,
size_t OutputBufferLength, size_t InputBufferLength,
ULONG IoControlCode)
{
UNREFERENCED_PARAMETER(OutputBufferLength);
UNREFERENCED_PARAMETER(InputBufferLength);
UNREFERENCED_PARAMETER(IoControlCode);
ForwardRequest(Request);
}

void CUsbDkFilterStrategy::IoInCallerContext(WDFDEVICE Device, WDFREQUEST Request)
{
auto status = WdfDeviceEnqueueRequest(Device, Request);
Expand Down
11 changes: 6 additions & 5 deletions UsbDk/FilterStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ class CUsbDkFilterStrategy
virtual void IoInCallerContext(WDFDEVICE Device, WDFREQUEST Request);

virtual void IoDeviceControl(WDFREQUEST Request,
size_t OutputBufferLength, size_t InputBufferLength,
ULONG IoControlCode);
size_t /*OutputBufferLength*/, size_t /*InputBufferLength*/,
ULONG /*IoControlCode*/)
{ ForwardRequest(Request); }

virtual void IoDeviceControlConfig(WDFREQUEST Request,
size_t OutputBufferLength, size_t InputBufferLength,
ULONG IoControlCode)
{ IoDeviceControl(Request, OutputBufferLength, InputBufferLength, IoControlCode); }
size_t /*OutputBufferLength*/, size_t /*InputBufferLength*/,
ULONG /*IoControlCode*/)
{ ForwardRequest(Request); }

virtual NTSTATUS MakeAvailable() = 0;

Expand Down

0 comments on commit 00cf4cb

Please sign in to comment.