Преглед изворни кода

Staging: keucr: fix up US_ macro change

The usb tree renamed the USB storage defines to make more sense, so this
driver needs the changes as well so that things will compile properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman пре 14 година
родитељ
комит
bceadddd92
3 измењених фајлова са 9 додато и 9 уклоњено
  1. 3 3
      drivers/staging/keucr/scsiglue.c
  2. 2 2
      drivers/staging/keucr/transport.c
  3. 4 4
      drivers/staging/keucr/usb.c

+ 3 - 3
drivers/staging/keucr/scsiglue.c

@@ -30,7 +30,7 @@ static int slave_alloc(struct scsi_device *sdev)
 
 	blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1));
 
-	if (us->subclass == US_SC_UFI)
+	if (us->subclass == USB_SC_UFI)
 		sdev->sdev_target->pdt_1f_for_no_lun = 1;
 
 	return 0;
@@ -55,7 +55,7 @@ static int slave_configure(struct scsi_device *sdev)
 
 	if (sdev->type == TYPE_DISK)
 	{
-		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;
 		sdev->use_192_bytes_for_3f = 1;
 		if (us->fflags & US_FL_NO_WP_DETECT)
@@ -76,7 +76,7 @@ static int slave_configure(struct scsi_device *sdev)
 		sdev->use_10_for_ms = 1;
 	}
 
-	if ((us->protocol == US_PR_CB || us->protocol == US_PR_CBI) && sdev->scsi_level == SCSI_UNKNOWN)
+	if ((us->protocol == USB_PR_CB || us->protocol == USB_PR_CBI) && sdev->scsi_level == SCSI_UNKNOWN)
 		us->max_lun = 0;
 
 	if (us->fflags & US_FL_NOT_LOCKABLE)

+ 2 - 2
drivers/staging/keucr/transport.c

@@ -315,7 +315,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
 	/* Determine if we need to auto-sense */
 	need_auto_sense = 0;
 
-	if ((us->protocol == US_PR_CB || us->protocol == US_PR_DPCM_USB) && srb->sc_data_direction != DMA_FROM_DEVICE)
+	if ((us->protocol == USB_PR_CB || us->protocol == USB_PR_DPCM_USB) && srb->sc_data_direction != DMA_FROM_DEVICE)
 	{
 		//printk("-- CB transport device requiring auto-sense\n");
 		need_auto_sense = 1;
@@ -338,7 +338,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
 		scsi_eh_prep_cmnd(srb, &ses, NULL, 0, US_SENSE_SIZE);
 
 		/* 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;

+ 4 - 4
drivers/staging/keucr/usb.c

@@ -343,7 +343,7 @@ static int get_transport(struct us_data *us)
 {
       printk("usb --- get_transport\n");
 	switch (us->protocol) {
-	case US_PR_BULK:
+	case USB_PR_BULK:
 		us->transport_name = "Bulk";
 		us->transport = usb_stor_Bulk_transport;
 		us->transport_reset = usb_stor_Bulk_reset;
@@ -367,7 +367,7 @@ static int get_protocol(struct us_data *us)
 	printk("us->pusb_dev->descriptor.idVendor = %x\n", us->pusb_dev->descriptor.idVendor);
 	printk("us->pusb_dev->descriptor.idProduct = %x\n", us->pusb_dev->descriptor.idProduct);
 	switch (us->subclass) {
-	case US_SC_SCSI:
+	case USB_SC_SCSI:
 		us->protocol_name = "Transparent SCSI";
 		if( (us->pusb_dev->descriptor.idVendor == 0x0CF2) && (us->pusb_dev->descriptor.idProduct == 0x6250) )
 			us->proto_handler = ENE_stor_invoke_transport;
@@ -418,7 +418,7 @@ static int get_pipes(struct us_data *us)
 		}
 	}
 
-	if (!ep_in || !ep_out || (us->protocol == US_PR_CBI && !ep_int))
+	if (!ep_in || !ep_out || (us->protocol == USB_PR_CBI && !ep_int))
 	{
 		printk("Endpoint sanity check failed! Rejecting dev.\n");
 		return -EIO;
@@ -564,7 +564,7 @@ static int usb_stor_scan_thread(void * __us)
 	if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags))
 	{
 		/* For bulk-only devices, determine the max LUN value */
-		if (us->protocol == US_PR_BULK && !(us->fflags & US_FL_SINGLE_LUN))
+		if (us->protocol == USB_PR_BULK && !(us->fflags & US_FL_SINGLE_LUN))
 		{
 			mutex_lock(&us->dev_mutex);
 			us->max_lun = usb_stor_Bulk_max_lun(us);