Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions drivers/usb/usbstor/usbstor.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,12 @@ DriverEntry(

DPRINT("********* USB Storage *********\n");

DriverObject->DriverUnload = USBSTOR_Unload;
DriverObject->DriverExtension->AddDevice = USBSTOR_AddDevice;
DriverObject->DriverStartIo = USBSTOR_StartIo;
DriverObject->MajorFunction[IRP_MJ_CREATE] = USBSTOR_DispatchClose;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = USBSTOR_DispatchClose;
if(1)
DriverObject->DriverUnload = USBSTOR_Unload; DriverObject->DriverExtension->AddDevice = USBSTOR_AddDevice; DriverObject->DriverStartIo = USBSTOR_StartIo; DriverObject->MajorFunction[IRP_MJ_CREATE] = USBSTOR_DispatchClose; DriverObject->MajorFunction[IRP_MJ_CLOSE] = USBSTOR_DispatchClose;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Lines should be <= 50 characters long [whitespace/line_length] [2]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐶🐶

DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = USBSTOR_DispatchDeviceControl; // scsi pass through requests
DriverObject->MajorFunction[IRP_MJ_READ] = USBSTOR_DispatchReadWrite;
DriverObject->MajorFunction[IRP_MJ_WRITE] = USBSTOR_DispatchReadWrite;
DriverObject->MajorFunction[IRP_MJ_SCSI] = USBSTOR_DispatchScsi;
DriverObject->MajorFunction[IRP_MJ_PNP] = USBSTOR_DispatchPnp;
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = USBSTOR_DispatchSystemControl;
DriverObject->MajorFunction[IRP_MJ_POWER] = USBSTOR_DispatchPower;
DriverObject->MajorFunction[IRP_MJ_SCSI] = USBSTOR_DispatchScsi; DriverObject->MajorFunction[IRP_MJ_PNP] = USBSTOR_DispatchPnp; DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = USBSTOR_DispatchSystemControl; DriverObject->MajorFunction[IRP_MJ_POWER] = USBSTOR_DispatchPower;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Lines should be <= 50 characters long [whitespace/line_length] [2]


return STATUS_SUCCESS;
}