Skip to content

Commit 8fa7fd7

Browse files
mina86gregkh
authored andcommitted
USB: storage: Use USB_ prefix instead of US_ prefix
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 <[email protected]> Cc: Alan Stern <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1992de8 commit 8fa7fd7

18 files changed

+381
-380
lines changed

drivers/block/ub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum);
396396
#else
397397

398398
static const struct usb_device_id ub_usb_ids[] = {
399-
{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_BULK) },
399+
{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, USB_SC_SCSI, USB_PR_BULK) },
400400
{ }
401401
};
402402

drivers/usb/storage/scsiglue.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static int slave_alloc (struct scsi_device *sdev)
113113
* Let the scanning code know if this target merely sets
114114
* Peripheral Device Type to 0x1f to indicate no LUN.
115115
*/
116-
if (us->subclass == US_SC_UFI)
116+
if (us->subclass == USB_SC_UFI)
117117
sdev->sdev_target->pdt_1f_for_no_lun = 1;
118118

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

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

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

drivers/usb/storage/sddr09.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,7 @@ static int sddr09_probe(struct usb_interface *intf,
17601760
if (result)
17611761
return result;
17621762

1763-
if (us->protocol == US_PR_DPCM_USB) {
1763+
if (us->protocol == USB_PR_DPCM_USB) {
17641764
us->transport_name = "Control/Bulk-EUSB/SDDR09";
17651765
us->transport = dpcm_transport;
17661766
us->transport_reset = usb_stor_CB_reset;

drivers/usb/storage/transport.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
642642
* unless the operation involved a data-in transfer. Devices
643643
* can signal most data-in errors by stalling the bulk-in pipe.
644644
*/
645-
if ((us->protocol == US_PR_CB || us->protocol == US_PR_DPCM_USB) &&
645+
if ((us->protocol == USB_PR_CB || us->protocol == USB_PR_DPCM_USB) &&
646646
srb->sc_data_direction != DMA_FROM_DEVICE) {
647647
US_DEBUGP("-- CB transport device requiring auto-sense\n");
648648
need_auto_sense = 1;
@@ -701,8 +701,8 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
701701
scsi_eh_prep_cmnd(srb, &ses, NULL, 0, sense_size);
702702

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

932932
result = usb_stor_intr_transfer(us, us->iobuf, 2);
@@ -942,7 +942,7 @@ int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us)
942942
* that this means we could be ignoring a real error on these
943943
* commands, but that can't be helped.
944944
*/
945-
if (us->subclass == US_SC_UFI) {
945+
if (us->subclass == USB_SC_UFI) {
946946
if (srb->cmnd[0] == REQUEST_SENSE ||
947947
srb->cmnd[0] == INQUIRY)
948948
return USB_STOR_TRANSPORT_GOOD;

drivers/usb/storage/unusual_alauda.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
UNUSUAL_DEV( 0x0584, 0x0008, 0x0102, 0x0102,
2222
"Fujifilm",
2323
"DPC-R1 (Alauda)",
24-
US_SC_SCSI, US_PR_ALAUDA, init_alauda, 0),
24+
USB_SC_SCSI, USB_PR_ALAUDA, init_alauda, 0),
2525

2626
UNUSUAL_DEV( 0x07b4, 0x010a, 0x0102, 0x0102,
2727
"Olympus",
2828
"MAUSB-10 (Alauda)",
29-
US_SC_SCSI, US_PR_ALAUDA, init_alauda, 0),
29+
USB_SC_SCSI, USB_PR_ALAUDA, init_alauda, 0),
3030

3131
#endif /* defined(CONFIG_USB_STORAGE_ALAUDA) || ... */

drivers/usb/storage/unusual_cypress.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999,
2424
"Cypress",
2525
"Cypress AT2LP",
26-
US_SC_CYP_ATACB, US_PR_DEVICE, NULL, 0),
26+
USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
2727

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

3434
#endif /* defined(CONFIG_USB_STORAGE_CYPRESS_ATACB) || ... */

drivers/usb/storage/unusual_datafab.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
UNUSUAL_DEV( 0x07c4, 0xa000, 0x0000, 0x0015,
2222
"Datafab",
2323
"MDCFE-B USB CF Reader",
24-
US_SC_SCSI, US_PR_DATAFAB, NULL,
24+
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
2525
0),
2626

2727
/*
@@ -38,45 +38,45 @@ UNUSUAL_DEV( 0x07c4, 0xa000, 0x0000, 0x0015,
3838
UNUSUAL_DEV( 0x07c4, 0xa001, 0x0000, 0xffff,
3939
"SIIG/Datafab",
4040
"SIIG/Datafab Memory Stick+CF Reader/Writer",
41-
US_SC_SCSI, US_PR_DATAFAB, NULL,
41+
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
4242
0),
4343

4444
/* Reported by Josef Reisinger <[email protected]> */
4545
UNUSUAL_DEV( 0x07c4, 0xa002, 0x0000, 0xffff,
4646
"Datafab/Unknown",
4747
"MD2/MD3 Disk enclosure",
48-
US_SC_SCSI, US_PR_DATAFAB, NULL,
48+
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
4949
US_FL_SINGLE_LUN),
5050

5151
UNUSUAL_DEV( 0x07c4, 0xa003, 0x0000, 0xffff,
5252
"Datafab/Unknown",
5353
"Datafab-based Reader",
54-
US_SC_SCSI, US_PR_DATAFAB, NULL,
54+
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
5555
0),
5656

5757
UNUSUAL_DEV( 0x07c4, 0xa004, 0x0000, 0xffff,
5858
"Datafab/Unknown",
5959
"Datafab-based Reader",
60-
US_SC_SCSI, US_PR_DATAFAB, NULL,
60+
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
6161
0),
6262

6363
UNUSUAL_DEV( 0x07c4, 0xa005, 0x0000, 0xffff,
6464
"PNY/Datafab",
6565
"PNY/Datafab CF+SM Reader",
66-
US_SC_SCSI, US_PR_DATAFAB, NULL,
66+
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
6767
0),
6868

6969
UNUSUAL_DEV( 0x07c4, 0xa006, 0x0000, 0xffff,
7070
"Simple Tech/Datafab",
7171
"Simple Tech/Datafab CF+SM Reader",
72-
US_SC_SCSI, US_PR_DATAFAB, NULL,
72+
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
7373
0),
7474

7575
/* Submitted by Olaf Hering <[email protected]> */
7676
UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0xffff,
7777
"Datafab Systems, Inc.",
7878
"USB to CF + SM Combo (LC1)",
79-
US_SC_SCSI, US_PR_DATAFAB, NULL,
79+
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
8080
0),
8181

8282
/* Reported by Felix Moeller <[email protected]>
@@ -86,13 +86,13 @@ UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0xffff,
8686
UNUSUAL_DEV( 0x07c4, 0xa10b, 0x0000, 0xffff,
8787
"DataFab Systems Inc.",
8888
"USB CF+MS",
89-
US_SC_SCSI, US_PR_DATAFAB, NULL,
89+
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
9090
0),
9191

9292
UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xffff,
9393
"Acomdata",
9494
"CF",
95-
US_SC_SCSI, US_PR_DATAFAB, NULL,
95+
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
9696
US_FL_SINGLE_LUN),
9797

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

0 commit comments

Comments
 (0)