From ae101f9f54c6f28d7b9e54d037af505ea5bc46c7 Mon Sep 17 00:00:00 2001 From: winbatt <36714791+winbatt@users.noreply.github.com> Date: Thu, 8 Mar 2018 08:11:04 -0800 Subject: [PATCH] Update wdf.c (#220) No need to configure file handler. --- simbatt/func/wdf.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/simbatt/func/wdf.c b/simbatt/func/wdf.c index cb0adbb17..e311d25cc 100644 --- a/simbatt/func/wdf.c +++ b/simbatt/func/wdf.c @@ -167,8 +167,7 @@ Return Value: WDF_OBJECT_ATTRIBUTES DeviceAttributes; PSIMBATT_FDO_DATA DevExt; - WDFDEVICE DeviceHandle; - WDF_FILEOBJECT_CONFIG FileObjectConfig; + WDFDEVICE DeviceHandle; WDF_OBJECT_ATTRIBUTES LockAttributes; WDF_PNPPOWER_EVENT_CALLBACKS PnpPowerCallbacks; WDFQUEUE Queue; @@ -192,21 +191,6 @@ Return Value: PnpPowerCallbacks.EvtDeviceQueryStop = SimBattQueryStop; WdfDeviceInitSetPnpPowerEventCallbacks(DeviceInit, &PnpPowerCallbacks); - // - // Configure file handlers to forward all create, close, and cleanup - // requests to the PDO. - // - - WDF_FILEOBJECT_CONFIG_INIT(&FileObjectConfig, - WDF_NO_EVENT_CALLBACK, - WDF_NO_EVENT_CALLBACK, - WDF_NO_EVENT_CALLBACK); - - FileObjectConfig.AutoForwardCleanupClose = WdfTrue; - WdfDeviceInitSetFileObjectConfig(DeviceInit, - &FileObjectConfig, - WDF_NO_OBJECT_ATTRIBUTES); - // // Register WDM preprocess callbacks for IRP_MJ_DEVICE_CONTROL and // IRP_MJ_SYSTEM_CONTROL. The battery class driver needs to handle these IO