Commit abaeeb6c authored by Matthew Dharm's avatar Matthew Dharm Committed by Anton Blanchard

[PATCH] USB: storage: remove inline function

This patch removes a single-line inline function and replaces it with it's
expansion everywhere.   The inline function was really only there for a
transitional step.
parent 4040aa55
......@@ -134,7 +134,8 @@ freecom_readdata (Scsi_Cmnd *srb, struct us_data *us,
/* Now transfer all of our blocks. */
US_DEBUGP("Start of read\n");
result = usb_stor_bulk_transfer_srb(us, ipipe, srb, count);
result = usb_stor_bulk_transfer_sg(us, ipipe, srb->request_buffer,
count, srb->use_sg, &srb->resid);
US_DEBUGP("freecom_readdata done!\n");
if (result > USB_STOR_XFER_SHORT)
......@@ -168,7 +169,8 @@ freecom_writedata (Scsi_Cmnd *srb, struct us_data *us,
/* Now transfer all of our blocks. */
US_DEBUGP("Start of write\n");
result = usb_stor_bulk_transfer_srb(us, opipe, srb, count);
result = usb_stor_bulk_transfer_sg(us, opipe, srb->request_buffer,
count, srb->use_sg, &srb->resid);
US_DEBUGP("freecom_writedata done!\n");
if (result > USB_STOR_XFER_SHORT)
......
......@@ -1562,8 +1562,10 @@ int sddr09_transport(Scsi_Cmnd *srb, struct us_data *us)
"sending" : "receiving",
srb->request_bufflen);
result = usb_stor_bulk_transfer_srb(us, pipe, srb,
srb->request_bufflen);
result = usb_stor_bulk_transfer_sg(us, pipe,
srb->request_buffer,
srb->request_bufflen,
srb->use_sg, &srb->resid);
return (result == USB_STOR_XFER_GOOD ?
USB_STOR_TRANSPORT_GOOD : USB_STOR_TRANSPORT_ERROR);
......
......@@ -779,8 +779,9 @@ int usb_stor_CBI_transport(Scsi_Cmnd *srb, struct us_data *us)
if (transfer_length) {
unsigned int pipe = srb->sc_data_direction == SCSI_DATA_READ ?
us->recv_bulk_pipe : us->send_bulk_pipe;
result = usb_stor_bulk_transfer_srb(us, pipe, srb,
transfer_length);
result = usb_stor_bulk_transfer_sg(us, pipe,
srb->request_buffer, transfer_length,
srb->use_sg, &srb->resid);
US_DEBUGP("CBI data stage result is 0x%x\n", result);
if (result == USB_STOR_XFER_ERROR)
return USB_STOR_TRANSPORT_ERROR;
......@@ -869,8 +870,9 @@ int usb_stor_CB_transport(Scsi_Cmnd *srb, struct us_data *us)
if (transfer_length) {
unsigned int pipe = srb->sc_data_direction == SCSI_DATA_READ ?
us->recv_bulk_pipe : us->send_bulk_pipe;
result = usb_stor_bulk_transfer_srb(us, pipe, srb,
transfer_length);
result = usb_stor_bulk_transfer_sg(us, pipe,
srb->request_buffer, transfer_length,
srb->use_sg, &srb->resid);
US_DEBUGP("CB data stage result is 0x%x\n", result);
if (result == USB_STOR_XFER_ERROR)
return USB_STOR_TRANSPORT_ERROR;
......@@ -951,8 +953,9 @@ int usb_stor_Bulk_transport(Scsi_Cmnd *srb, struct us_data *us)
if (transfer_length) {
unsigned int pipe = srb->sc_data_direction == SCSI_DATA_READ ?
us->recv_bulk_pipe : us->send_bulk_pipe;
result = usb_stor_bulk_transfer_srb(us, pipe, srb,
transfer_length);
result = usb_stor_bulk_transfer_sg(us, pipe,
srb->request_buffer, transfer_length,
srb->use_sg, &srb->resid);
US_DEBUGP("Bulk data transfer result 0x%x\n", result);
if (result == USB_STOR_XFER_ERROR)
return USB_STOR_TRANSPORT_ERROR;
......
......@@ -178,10 +178,4 @@ extern int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
extern int usb_stor_bulk_transfer_sg(struct us_data *us, unsigned int pipe,
void *buf, unsigned int length, int use_sg, int *residual);
static __inline__ int usb_stor_bulk_transfer_srb(struct us_data *us,
unsigned int pipe, Scsi_Cmnd *srb, unsigned int length) {
return usb_stor_bulk_transfer_sg(us, pipe, srb->request_buffer,
length, srb->use_sg, &srb->resid);
}
#endif
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