Skip to content

Commit

Permalink
USB: storage: Use USB_ prefix instead of US_ prefix
Browse files Browse the repository at this point in the history
This commit changes prefix for some of the USB mass storage
class related macros (ie. USB_SC_ for subclass and USB_PR_
for class).

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Michal Nazarewicz authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 1992de8 commit 8fa7fd7
Show file tree
Hide file tree
Showing 18 changed files with 381 additions and 380 deletions.
2 changes: 1 addition & 1 deletion drivers/block/ub.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum);
#else

static const struct usb_device_id ub_usb_ids[] = {
{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_BULK) },
{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, USB_SC_SCSI, USB_PR_BULK) },
{ }
};

Expand Down
8 changes: 4 additions & 4 deletions drivers/usb/storage/scsiglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static int slave_alloc (struct scsi_device *sdev)
* Let the scanning code know if this target merely sets
* Peripheral Device Type to 0x1f to indicate no LUN.
*/
if (us->subclass == US_SC_UFI)
if (us->subclass == USB_SC_UFI)
sdev->sdev_target->pdt_1f_for_no_lun = 1;

return 0;
Expand Down Expand Up @@ -176,7 +176,7 @@ static int slave_configure(struct scsi_device *sdev)
/* Disk-type devices use MODE SENSE(6) if the protocol
* (SubClass) is Transparent SCSI, otherwise they use
* MODE SENSE(10). */
if (us->subclass != US_SC_SCSI && us->subclass != US_SC_CYP_ATACB)
if (us->subclass != USB_SC_SCSI && us->subclass != USB_SC_CYP_ATACB)
sdev->use_10_for_ms = 1;

/* Many disks only accept MODE SENSE transfer lengths of
Expand Down Expand Up @@ -245,7 +245,7 @@ static int slave_configure(struct scsi_device *sdev)
* capacity will be decremented or is correct. */
if (!(us->fflags & (US_FL_FIX_CAPACITY | US_FL_CAPACITY_OK |
US_FL_SCM_MULT_TARG)) &&
us->protocol == US_PR_BULK)
us->protocol == USB_PR_BULK)
us->use_last_sector_hacks = 1;
} else {

Expand All @@ -261,7 +261,7 @@ static int slave_configure(struct scsi_device *sdev)
* scsi_level == 0 (UNKNOWN). Hence such devices must necessarily
* be single-LUN.
*/
if ((us->protocol == US_PR_CB || us->protocol == US_PR_CBI) &&
if ((us->protocol == USB_PR_CB || us->protocol == USB_PR_CBI) &&
sdev->scsi_level == SCSI_UNKNOWN)
us->max_lun = 0;

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/storage/sddr09.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@ static int sddr09_probe(struct usb_interface *intf,
if (result)
return result;

if (us->protocol == US_PR_DPCM_USB) {
if (us->protocol == USB_PR_DPCM_USB) {
us->transport_name = "Control/Bulk-EUSB/SDDR09";
us->transport = dpcm_transport;
us->transport_reset = usb_stor_CB_reset;
Expand Down
10 changes: 5 additions & 5 deletions drivers/usb/storage/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
* unless the operation involved a data-in transfer. Devices
* can signal most data-in errors by stalling the bulk-in pipe.
*/
if ((us->protocol == US_PR_CB || us->protocol == US_PR_DPCM_USB) &&
if ((us->protocol == USB_PR_CB || us->protocol == USB_PR_DPCM_USB) &&
srb->sc_data_direction != DMA_FROM_DEVICE) {
US_DEBUGP("-- CB transport device requiring auto-sense\n");
need_auto_sense = 1;
Expand Down Expand Up @@ -701,8 +701,8 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
scsi_eh_prep_cmnd(srb, &ses, NULL, 0, sense_size);

/* FIXME: we must do the protocol translation here */
if (us->subclass == US_SC_RBC || us->subclass == US_SC_SCSI ||
us->subclass == US_SC_CYP_ATACB)
if (us->subclass == USB_SC_RBC || us->subclass == USB_SC_SCSI ||
us->subclass == USB_SC_CYP_ATACB)
srb->cmd_len = 6;
else
srb->cmd_len = 12;
Expand Down Expand Up @@ -926,7 +926,7 @@ int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us)
/* NOTE: CB does not have a status stage. Silly, I know. So
* we have to catch this at a higher level.
*/
if (us->protocol != US_PR_CBI)
if (us->protocol != USB_PR_CBI)
return USB_STOR_TRANSPORT_GOOD;

result = usb_stor_intr_transfer(us, us->iobuf, 2);
Expand All @@ -942,7 +942,7 @@ int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us)
* that this means we could be ignoring a real error on these
* commands, but that can't be helped.
*/
if (us->subclass == US_SC_UFI) {
if (us->subclass == USB_SC_UFI) {
if (srb->cmnd[0] == REQUEST_SENSE ||
srb->cmnd[0] == INQUIRY)
return USB_STOR_TRANSPORT_GOOD;
Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/storage/unusual_alauda.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
UNUSUAL_DEV( 0x0584, 0x0008, 0x0102, 0x0102,
"Fujifilm",
"DPC-R1 (Alauda)",
US_SC_SCSI, US_PR_ALAUDA, init_alauda, 0),
USB_SC_SCSI, USB_PR_ALAUDA, init_alauda, 0),

UNUSUAL_DEV( 0x07b4, 0x010a, 0x0102, 0x0102,
"Olympus",
"MAUSB-10 (Alauda)",
US_SC_SCSI, US_PR_ALAUDA, init_alauda, 0),
USB_SC_SCSI, USB_PR_ALAUDA, init_alauda, 0),

#endif /* defined(CONFIG_USB_STORAGE_ALAUDA) || ... */
4 changes: 2 additions & 2 deletions drivers/usb/storage/unusual_cypress.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999,
"Cypress",
"Cypress AT2LP",
US_SC_CYP_ATACB, US_PR_DEVICE, NULL, 0),
USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),

/* CY7C68310 : support atacb and atacb2 */
UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x9999,
"Cypress",
"Cypress ISD-300LP",
US_SC_CYP_ATACB, US_PR_DEVICE, NULL, 0),
USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),

#endif /* defined(CONFIG_USB_STORAGE_CYPRESS_ATACB) || ... */
20 changes: 10 additions & 10 deletions drivers/usb/storage/unusual_datafab.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
UNUSUAL_DEV( 0x07c4, 0xa000, 0x0000, 0x0015,
"Datafab",
"MDCFE-B USB CF Reader",
US_SC_SCSI, US_PR_DATAFAB, NULL,
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
0),

/*
Expand All @@ -38,45 +38,45 @@ UNUSUAL_DEV( 0x07c4, 0xa000, 0x0000, 0x0015,
UNUSUAL_DEV( 0x07c4, 0xa001, 0x0000, 0xffff,
"SIIG/Datafab",
"SIIG/Datafab Memory Stick+CF Reader/Writer",
US_SC_SCSI, US_PR_DATAFAB, NULL,
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
0),

/* Reported by Josef Reisinger <josef.reisinger@netcologne.de> */
UNUSUAL_DEV( 0x07c4, 0xa002, 0x0000, 0xffff,
"Datafab/Unknown",
"MD2/MD3 Disk enclosure",
US_SC_SCSI, US_PR_DATAFAB, NULL,
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
US_FL_SINGLE_LUN),

UNUSUAL_DEV( 0x07c4, 0xa003, 0x0000, 0xffff,
"Datafab/Unknown",
"Datafab-based Reader",
US_SC_SCSI, US_PR_DATAFAB, NULL,
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
0),

UNUSUAL_DEV( 0x07c4, 0xa004, 0x0000, 0xffff,
"Datafab/Unknown",
"Datafab-based Reader",
US_SC_SCSI, US_PR_DATAFAB, NULL,
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
0),

UNUSUAL_DEV( 0x07c4, 0xa005, 0x0000, 0xffff,
"PNY/Datafab",
"PNY/Datafab CF+SM Reader",
US_SC_SCSI, US_PR_DATAFAB, NULL,
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
0),

UNUSUAL_DEV( 0x07c4, 0xa006, 0x0000, 0xffff,
"Simple Tech/Datafab",
"Simple Tech/Datafab CF+SM Reader",
US_SC_SCSI, US_PR_DATAFAB, NULL,
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
0),

/* Submitted by Olaf Hering <olh@suse.de> */
UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0xffff,
"Datafab Systems, Inc.",
"USB to CF + SM Combo (LC1)",
US_SC_SCSI, US_PR_DATAFAB, NULL,
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
0),

/* Reported by Felix Moeller <felix@derklecks.de>
Expand All @@ -86,13 +86,13 @@ UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0xffff,
UNUSUAL_DEV( 0x07c4, 0xa10b, 0x0000, 0xffff,
"DataFab Systems Inc.",
"USB CF+MS",
US_SC_SCSI, US_PR_DATAFAB, NULL,
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
0),

UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xffff,
"Acomdata",
"CF",
US_SC_SCSI, US_PR_DATAFAB, NULL,
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
US_FL_SINGLE_LUN),

#endif /* defined(CONFIG_USB_STORAGE_DATAFAB) || ... */
Loading

0 comments on commit 8fa7fd7

Please sign in to comment.