Commit 6f43b3a3 authored by Oliver Neukum's avatar Oliver Neukum Committed by David S. Miller

[PATCH] USB: small optimisation for hpusbscsi

This does a little optimisation, namely kill an unneeded counter
and put the members of the device descriptor structure in an order
that should be a little more efficient.
parent b13c691e
......@@ -273,8 +273,6 @@ static int hpusbscsi_scsi_queuecommand (Scsi_Cmnd *srb, scsi_callback callback)
usb_urb_callback usb_callback;
int res;
hpusbscsi->use_count++;
/* we don't answer for anything but our single device on any faked host controller */
if ( srb->device->lun || srb->device->id || srb->device->channel ) {
if (callback) {
......@@ -341,7 +339,6 @@ static int hpusbscsi_scsi_queuecommand (Scsi_Cmnd *srb, scsi_callback callback)
}
out:
hpusbscsi->use_count--;
return 0;
}
......
......@@ -20,25 +20,25 @@ struct hpusbscsi
int ep_in;
int ep_int;
int interrupt_interval;
struct Scsi_Host *host;
Scsi_Host_Template ctempl;
int number;
int fragment;
struct Scsi_Host *host;
scsi_callback scallback;
Scsi_Cmnd *srb;
u8 sense_command[SENSE_COMMAND_SIZE];
int use_count;
wait_queue_head_t pending;
wait_queue_head_t deathrow;
struct urb *dataurb;
struct urb *controlurb;
int fragment;
int state;
int current_data_pipe;
Scsi_Host_Template ctempl;
u8 sense_command[SENSE_COMMAND_SIZE];
u8 scsi_state_byte;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment