aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/freecom.c
diff options
context:
space:
mode:
authorMartin Enderleit <martin@martin-desktop.(none)>2010-07-10 10:50:12 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-10 17:35:39 -0400
commit7c7e2d00435bd8129c4bacb73fe4a2d4db4e7d7c (patch)
tree5dde72edd1cc1559a6d82d383008eecd1b807fb1 /drivers/usb/storage/freecom.c
parent8ca47c8a7621835914c053caaec74e66147dd7dc (diff)
usb: storage: freecom: Fixed several coding style issues.
Fixed several coding style issues in freecom.c. Signed-off-by: Martin Enderleit <menderleit@gmail.com> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: Daniel Mack <daniel@caiaq.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage/freecom.c')
-rw-r--r--drivers/usb/storage/freecom.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c
index 54cc94277acb..6542ca40d505 100644
--- a/drivers/usb/storage/freecom.c
+++ b/drivers/usb/storage/freecom.c
@@ -269,7 +269,7 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
269 /* The firmware will time-out commands after 20 seconds. Some commands 269 /* The firmware will time-out commands after 20 seconds. Some commands
270 * can legitimately take longer than this, so we use a different 270 * can legitimately take longer than this, so we use a different
271 * command that only waits for the interrupt and then sends status, 271 * command that only waits for the interrupt and then sends status,
272 * without having to send a new ATAPI command to the device. 272 * without having to send a new ATAPI command to the device.
273 * 273 *
274 * NOTE: There is some indication that a data transfer after a timeout 274 * NOTE: There is some indication that a data transfer after a timeout
275 * may not work, but that is a condition that should never happen. 275 * may not work, but that is a condition that should never happen.
@@ -324,14 +324,14 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
324 324
325 /* Find the length we desire to read. */ 325 /* Find the length we desire to read. */
326 switch (srb->cmnd[0]) { 326 switch (srb->cmnd[0]) {
327 case INQUIRY: 327 case INQUIRY:
328 case REQUEST_SENSE: /* 16 or 18 bytes? spec says 18, lots of devices only have 16 */ 328 case REQUEST_SENSE: /* 16 or 18 bytes? spec says 18, lots of devices only have 16 */
329 case MODE_SENSE: 329 case MODE_SENSE:
330 case MODE_SENSE_10: 330 case MODE_SENSE_10:
331 length = le16_to_cpu(fst->Count); 331 length = le16_to_cpu(fst->Count);
332 break; 332 break;
333 default: 333 default:
334 length = scsi_bufflen(srb); 334 length = scsi_bufflen(srb);
335 } 335 }
336 336
337 /* verify that this amount is legal */ 337 /* verify that this amount is legal */
@@ -414,7 +414,7 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
414 /* should never hit here -- filtered in usb.c */ 414 /* should never hit here -- filtered in usb.c */
415 US_DEBUGP ("freecom unimplemented direction: %d\n", 415 US_DEBUGP ("freecom unimplemented direction: %d\n",
416 us->srb->sc_data_direction); 416 us->srb->sc_data_direction);
417 // Return fail, SCSI seems to handle this better. 417 /* Return fail, SCSI seems to handle this better. */
418 return USB_STOR_TRANSPORT_FAILED; 418 return USB_STOR_TRANSPORT_FAILED;
419 break; 419 break;
420 } 420 }
@@ -494,8 +494,7 @@ static void pdump (void *ibuffer, int length)
494 offset = 0; 494 offset = 0;
495 } 495 }
496 offset += sprintf (line+offset, "%08x:", i); 496 offset += sprintf (line+offset, "%08x:", i);
497 } 497 } else if ((i & 7) == 0) {
498 else if ((i & 7) == 0) {
499 offset += sprintf (line+offset, " -"); 498 offset += sprintf (line+offset, " -");
500 } 499 }
501 offset += sprintf (line+offset, " %02x", buffer[i] & 0xff); 500 offset += sprintf (line+offset, " %02x", buffer[i] & 0xff);