[PATCH 02/12] staging: ft1000: Remove dead code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove code which was under #if 0.

Signed-off-by: Marek Belisko <marek.belisko@xxxxxxxxxxxxxxx>
---
 .../staging/ft1000/ft1000-usb/ft1000_download.c    |   63 +-------------------
 1 files changed, 1 insertions(+), 62 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 696e319..edeabff 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -169,18 +169,6 @@ static u32 check_usb_db (struct ft1000_device *ft1000dev)
 	ret_val = 0;
 	break;
       }
-#if 0
-      // Check if Card is present
-      status = ft1000_read_register (ft1000dev, &temp, FT1000_REG_SUP_IMASK);
-      if (temp == 0x0000) {
-          break;
-      }
-
-      status = ft1000_read_register (ft1000dev, &temp, FT1000_REG_ASIC_ID);
-      if (temp == 0xffff) {
-         break;
-      }
-#endif
    }
 
 	return ret_val;
@@ -447,34 +435,6 @@ static long get_request_value(struct ft1000_device *ft1000dev)
 
 }
 
-#if 0
-static long get_request_value_usb(struct ft1000_device *ft1000dev)
-{
-   u32     value;
-   u16   tempword;
-   u32    status;
-   struct ft1000_info * pft1000info = netdev_priv(ft1000dev->net);
-
-       if (pft1000info->usbboot == 2) {
-          value = pft1000info->tempbuf[4];
-          tempword = pft1000info->tempbuf[5];
-       }
-       else {
-          value = 0;
-          status = ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_SIZE_LOC, (u8 *)&tempword, 1);
-       }
-
-       value |= (tempword << 16);
-       value = ntohl(value);
-
-   if (pft1000info->usbboot == 1)
-       pft1000info->usbboot = 2;
-
-   //DEBUG("get_request_value_usb: value is %x\n", value);
-   return value;
-
-}
-#endif
 
 //---------------------------------------------------------------------------
 // Function:    put_request_value
@@ -724,22 +684,7 @@ static u32 write_blk_fifo (struct ft1000_device *ft1000dev, u16 **pUsFile, u8 **
    if (byte_length < 64)
        byte_length = 68;
 
-#if 0
-   pblk = kzalloc(byte_length, GFP_KERNEL);
-   memcpy (pblk, *pUcFile, byte_length);
-
-   pipe = usb_sndbulkpipe (ft1000dev->dev, ft1000dev->bulk_out_endpointAddr);
 
-   Status = usb_bulk_msg (ft1000dev->dev,
-                          pipe,
-                          pblk,
-                          byte_length,
-                          &cnt,
-                          10);
-   DEBUG("write_blk_fifo Status = 0x%8x Bytes Transfer = %d Data = 0x%x\n", Status, cnt, *pblk);
-
-   kfree(pblk);
-#else
     usb_init_urb(ft1000dev->tx_urb);
     memcpy (ft1000dev->tx_buf, *pUcFile, byte_length);
     usb_fill_bulk_urb(ft1000dev->tx_urb,
@@ -751,7 +696,6 @@ static u32 write_blk_fifo (struct ft1000_device *ft1000dev, u16 **pUsFile, u8 **
                       (void*)ft1000dev);
 
     usb_submit_urb(ft1000dev->tx_urb, GFP_ATOMIC);
-#endif
 
    *pUsFile = *pUsFile + (word_length << 1);
    *pUcFile = *pUcFile + (word_length << 2);
@@ -1001,15 +945,10 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, u32  FileLeng
                   status = STATUS_FAILURE;
                   break;
                }
-#if 0
-               word_length = get_request_value_usb(ft1000dev);
-               //DEBUG("FT1000:download:word_length = %d\n", (int)word_length);
-               if (word_length > MAX_LENGTH/2)
-#else
+
                word_length = get_request_value(ft1000dev);
                //DEBUG("FT1000:download:word_length = %d\n", (int)word_length);
                if (word_length > MAX_LENGTH)
-#endif
                {
                   DEBUG("FT1000:download:Download error: Max length exceeded\n");
                   status = STATUS_FAILURE;
-- 
1.7.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux