summaryrefslogtreecommitdiff
path: root/usb
diff options
context:
space:
mode:
Diffstat (limited to 'usb')
-rw-r--r--usb/UcmCxUcsi/Acpi.cpp8
-rw-r--r--usb/ufxclientsample/device.c4
-rw-r--r--usb/usbsamp/sys/private.h5
-rw-r--r--usb/usbsamp/sys/stream.c4
4 files changed, 7 insertions, 14 deletions
diff --git a/usb/UcmCxUcsi/Acpi.cpp b/usb/UcmCxUcsi/Acpi.cpp
index ed90260d..33dec487 100644
--- a/usb/UcmCxUcsi/Acpi.cpp
+++ b/usb/UcmCxUcsi/Acpi.cpp
@@ -554,9 +554,9 @@ Acpi_EvaluateUcsiDsm (
FIELD_OFFSET(ACPI_EVAL_OUTPUT_BUFFER, Argument) +
outputArgumentBufferSize;
- outputBuffer = (PACPI_EVAL_OUTPUT_BUFFER) ExAllocatePoolWithTag(NonPagedPoolNx,
- outputBufferSize,
- TAG_UCSI);
+ outputBuffer = (PACPI_EVAL_OUTPUT_BUFFER) ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ outputBufferSize,
+ TAG_UCSI);
if (outputBuffer == nullptr)
{
@@ -565,8 +565,6 @@ Acpi_EvaluateUcsiDsm (
goto Exit;
}
- RtlZeroMemory(outputBuffer, outputBufferSize);
-
WDF_MEMORY_DESCRIPTOR_INIT_HANDLE(&inputMemDesc, inputMemory, NULL);
WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(&outputMemDesc, outputBuffer, (ULONG) outputBufferSize);
diff --git a/usb/ufxclientsample/device.c b/usb/ufxclientsample/device.c
index 3aa46c4c..8a7580bf 100644
--- a/usb/ufxclientsample/device.c
+++ b/usb/ufxclientsample/device.c
@@ -535,8 +535,8 @@ Arguments:
DeviceContext = UfxDeviceGetContext(ControllerContext->UfxDevice);
#pragma prefast(suppress:6014, "Memory allocation is expected")
- HardwareFailureContext = ExAllocatePoolWithTag(
- NonPagedPoolNx,
+ HardwareFailureContext = ExAllocatePool2(
+ POOL_FLAG_NON_PAGED,
sizeof(HARDWARE_FAILURE_CONTEXT),
UFX_CLIENT_TAG);
diff --git a/usb/usbsamp/sys/private.h b/usb/usbsamp/sys/private.h
index d6d7898b..def503f5 100644
--- a/usb/usbsamp/sys/private.h
+++ b/usb/usbsamp/sys/private.h
@@ -52,11 +52,6 @@ Environment:
#define DISPATCH_LATENCY_IN_MS 10
-
-#undef ExAllocatePool
-#define ExAllocatePool(type, size) \
- ExAllocatePoolWithTag(type, size, POOL_TAG);
-
#if DBG
#define UsbSamp_DbgPrint(level, _x_) \
diff --git a/usb/usbsamp/sys/stream.c b/usb/usbsamp/sys/stream.c
index ee434b35..d8cc05d9 100644
--- a/usb/usbsamp/sys/stream.c
+++ b/usb/usbsamp/sys/stream.c
@@ -199,8 +199,8 @@ Return Value:
pStreamInfo->NumberOfStreams = supportedStreams;
- pStreamInfo->StreamList = ExAllocatePoolWithTag(
- NonPagedPoolNx,
+ pStreamInfo->StreamList = ExAllocatePool2(
+ POOL_FLAG_NON_PAGED,
supportedStreams * sizeof(USBD_STREAM_INFORMATION),
POOL_TAG);