Skip to content

Commit

Permalink
Update wdf.c (microsoft#220)
Browse files Browse the repository at this point in the history
No need to configure file handler.
  • Loading branch information
winbatt authored and wm1 committed Mar 8, 2018
1 parent e44d02f commit ae101f9
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions simbatt/func/wdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit ae101f9

Please sign in to comment.