https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4f8379a02b525eb5ca60d…
commit 4f8379a02b525eb5ca60d83e80b108458c664d63
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sat Dec 30 11:44:25 2017 +0100
[DRIVERS] Use KeClearEvent instead of KeResetEvent where the previous state is not
needed.
---
drivers/filters/mountmgr/mountmgr.c | 2 +-
drivers/hid/kbdhid/kbdhid.c | 2 +-
drivers/hid/mouhid/mouhid.c | 2 +-
drivers/input/sermouse/readmouse.c | 2 +-
drivers/network/ndis/ndis/control.c | 2 +-
drivers/network/ndis/ndis/io.c | 2 +-
drivers/usb/usbhub_new/usbhub.c | 8 ++++----
drivers/usb/usbport/usbport.c | 2 +-
drivers/wdm/audio/legacy/stream/pnp.c | 2 +-
9 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/filters/mountmgr/mountmgr.c b/drivers/filters/mountmgr/mountmgr.c
index 54487a4cb3..1852dfc17f 100644
--- a/drivers/filters/mountmgr/mountmgr.c
+++ b/drivers/filters/mountmgr/mountmgr.c
@@ -872,7 +872,7 @@ MountMgrUnload(IN struct _DRIVER_OBJECT *DriverObject)
NextEntry =
RemoveHeadList(&(DeviceExtension->UniqueIdWorkerItemListHead));
WorkItem = CONTAINING_RECORD(NextEntry, UNIQUE_ID_WORK_ITEM,
UniqueIdWorkerItemListEntry);
- KeResetEvent(&UnloadEvent);
+ KeClearEvent(&UnloadEvent);
WorkItem->Event = &UnloadEvent;
KeReleaseSemaphore(&(DeviceExtension->DeviceLock), IO_NO_INCREMENT,
diff --git a/drivers/hid/kbdhid/kbdhid.c b/drivers/hid/kbdhid/kbdhid.c
index 4b240a46af..bacf72a010 100644
--- a/drivers/hid/kbdhid/kbdhid.c
+++ b/drivers/hid/kbdhid/kbdhid.c
@@ -289,7 +289,7 @@ KbdHid_Create(
DeviceExtension->FileObject = IoStack->FileObject;
/* reset event */
- KeResetEvent(&DeviceExtension->ReadCompletionEvent);
+ KeClearEvent(&DeviceExtension->ReadCompletionEvent);
/* initiating read */
Status = KbdHid_InitiateRead(DeviceExtension);
diff --git a/drivers/hid/mouhid/mouhid.c b/drivers/hid/mouhid/mouhid.c
index 193cf792c0..045090929d 100644
--- a/drivers/hid/mouhid/mouhid.c
+++ b/drivers/hid/mouhid/mouhid.c
@@ -497,7 +497,7 @@ MouHid_Create(
DeviceExtension->FileObject = IoStack->FileObject;
/* reset event */
- KeResetEvent(&DeviceExtension->ReadCompletionEvent);
+ KeClearEvent(&DeviceExtension->ReadCompletionEvent);
/* initiating read */
Status = MouHid_InitiateRead(DeviceExtension);
diff --git a/drivers/input/sermouse/readmouse.c b/drivers/input/sermouse/readmouse.c
index 6142e9bdeb..7526af1496 100644
--- a/drivers/input/sermouse/readmouse.c
+++ b/drivers/input/sermouse/readmouse.c
@@ -137,7 +137,7 @@ SermouseDeviceWorker(
if (Status != STATUS_TIMEOUT)
{
/* we need to stop the worker thread */
- KeResetEvent(&DeviceExtension->StopWorkerThreadEvent);
+ KeClearEvent(&DeviceExtension->StopWorkerThreadEvent);
break;
}
diff --git a/drivers/network/ndis/ndis/control.c b/drivers/network/ndis/ndis/control.c
index 614bf39858..7aa51efd91 100644
--- a/drivers/network/ndis/ndis/control.c
+++ b/drivers/network/ndis/ndis/control.c
@@ -261,7 +261,7 @@ NdisResetEvent(
* Event = Pointer to the initialized event object to be reset
*/
{
- KeResetEvent(&Event->Event);
+ KeClearEvent(&Event->Event);
}
diff --git a/drivers/network/ndis/ndis/io.c b/drivers/network/ndis/ndis/io.c
index faee64ae30..1775716fe5 100644
--- a/drivers/network/ndis/ndis/io.c
+++ b/drivers/network/ndis/ndis/io.c
@@ -416,7 +416,7 @@ NdisMAllocateMapRegisters(
NDIS_DbgPrint(MAX_TRACE, ("resetting event\n"));
- KeResetEvent(&AllocationEvent);
+ KeClearEvent(&AllocationEvent);
}
NDIS_DbgPrint(MAX_TRACE, ("returning success\n"));
diff --git a/drivers/usb/usbhub_new/usbhub.c b/drivers/usb/usbhub_new/usbhub.c
index ab60b45173..354e286505 100644
--- a/drivers/usb/usbhub_new/usbhub.c
+++ b/drivers/usb/usbhub_new/usbhub.c
@@ -2315,7 +2315,7 @@ USBH_ChangeIndication(IN PDEVICE_OBJECT DeviceObject,
if (InterlockedIncrement(&HubExtension->ResetRequestCount) == 1)
{
- KeResetEvent(&HubExtension->ResetEvent);
+ KeClearEvent(&HubExtension->ResetEvent);
}
HubWorkItemBuffer->HubExtension = HubExtension;
@@ -2415,7 +2415,7 @@ USBH_SubmitStatusChangeTransfer(IN PUSBHUB_FDO_EXTENSION
HubExtension)
TRUE,
TRUE);
- KeResetEvent(&HubExtension->StatusChangeEvent);
+ KeClearEvent(&HubExtension->StatusChangeEvent);
Status = IoCallDriver(HubExtension->LowerDevice, Irp);
@@ -2915,7 +2915,7 @@ USBD_RegisterRootHubCallBack(IN PUSBHUB_FDO_EXTENSION HubExtension)
return STATUS_NOT_IMPLEMENTED;
}
- KeResetEvent(&HubExtension->RootHubNotificationEvent);
+ KeClearEvent(&HubExtension->RootHubNotificationEvent);
return RootHubInitNotification(HubExtension->BusInterface.BusContext,
HubExtension,
@@ -3828,7 +3828,7 @@ return; //HACK: delete it line after fixing Power Manager!!!
if (IsHubCheck &&
!(HubExtension->HubFlags & USBHUB_FDO_FLAG_WAIT_IDLE_REQUEST))
{
- KeResetEvent(&HubExtension->IdleEvent);
+ KeClearEvent(&HubExtension->IdleEvent);
HubExtension->HubFlags |= USBHUB_FDO_FLAG_WAIT_IDLE_REQUEST;
IsHubIdle = TRUE;
}
diff --git a/drivers/usb/usbport/usbport.c b/drivers/usb/usbport/usbport.c
index ad421d442b..09286465bb 100644
--- a/drivers/usb/usbport/usbport.c
+++ b/drivers/usb/usbport/usbport.c
@@ -1393,7 +1393,7 @@ USBPORT_WorkerThread(IN PVOID StartContext)
KeQuerySystemTime(&NewTime);
KeAcquireSpinLock(&FdoExtension->WorkerThreadEventSpinLock,
&OldIrql);
- KeResetEvent(&FdoExtension->WorkerThreadEvent);
+ KeClearEvent(&FdoExtension->WorkerThreadEvent);
KeReleaseSpinLock(&FdoExtension->WorkerThreadEventSpinLock, OldIrql);
DPRINT_CORE("USBPORT_WorkerThread: run \n");
diff --git a/drivers/wdm/audio/legacy/stream/pnp.c
b/drivers/wdm/audio/legacy/stream/pnp.c
index 67f1878360..b8814cdb1f 100644
--- a/drivers/wdm/audio/legacy/stream/pnp.c
+++ b/drivers/wdm/audio/legacy/stream/pnp.c
@@ -413,7 +413,7 @@ StreamClassStartDevice(
/* Setup get stream info struct */
RequestBlock->Block.Command = SRB_GET_STREAM_INFO;
RequestBlock->Block.CommandData.StreamBuffer = StreamDescriptor;
- KeResetEvent(&RequestBlock->Event);
+ KeClearEvent(&RequestBlock->Event);
/* send the request */
DriverObjectExtension->Data.HwReceivePacket((PHW_STREAM_REQUEST_BLOCK)RequestBlock);