[PATCH] staging:ft1000: remove variable types wrappers.

Belisko Marek marek.belisko at gmail.com
Mon Sep 27 14:09:29 UTC 2010


 Signed-off-by: Marek Belisko <marek.belisko at gmail.com>

---
 drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c   |   24 +-
 .../staging/ft1000/ft1000-usb/ft1000_download.c    |  281 ++++++++++----------
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c      |  178 ++++++------
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.h      |    4 +-
 drivers/staging/ft1000/ft1000-usb/ft1000_proc.c    |    8 +-
 drivers/staging/ft1000/ft1000-usb/ft1000_usb.c     |    8 +-
 drivers/staging/ft1000/ft1000-usb/ft1000_usb.h     |   16 +-
 7 files changed, 253 insertions(+), 266 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
index 0b7ee73..79619a4 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
@@ -42,8 +42,8 @@
 //#include "ft1000_ioctl.h"

 void ft1000_DestroyDevice(struct net_device *dev);
-u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, USHORT indx,
-			PUCHAR buffer, u8 highlow);
+u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, u16 indx,
+			u8 *buffer, u8 highlow);
 u16 ft1000_read_register(struct ft1000_device *ft1000dev, short *Data,
 			 u16 nRegIndx);

@@ -76,7 +76,7 @@ spinlock_t free_buff_lock;
 int numofmsgbuf = 0;

 // Global variable to indicate that all provisioning data is sent to DSP
-//BOOLEAN fProvComplete;
+//bool fProvComplete;

 //
 // Table of entry-point routines for char device
@@ -639,13 +639,13 @@ static long ft1000_ChIoctl(struct file *File,
unsigned int Command,

 		if (info->ProgConStat != 0xFF) {
 			ft1000_read_dpram16(ft1000dev, FT1000_MAG_DSP_LED,
-					    (PUCHAR) & ledStat,
+					    (u8 *) & ledStat,
 					    FT1000_MAG_DSP_LED_INDX);
 			get_stat_data.LedStat = ntohs(ledStat);
 			DEBUG("FT1000:ft1000_ChIoctl: LedStat = 0x%x\n",
 			      get_stat_data.LedStat);
 			ft1000_read_dpram16(ft1000dev, FT1000_MAG_DSP_CON_STATE,
-					    (PUCHAR) & conStat,
+					    (u8 *) & conStat,
 					    FT1000_MAG_DSP_CON_STATE_INDX);
 			get_stat_data.ConStat = ntohs(conStat);
 			DEBUG("FT1000:ft1000_ChIoctl: ConStat = 0x%x\n",
@@ -674,12 +674,12 @@ static long ft1000_ChIoctl(struct file *File,
unsigned int Command,
 		{
 			IOCTL_DPRAM_BLK dpram_data;
 			//IOCTL_DPRAM_COMMAND dpram_command;
-			USHORT qtype;
-			USHORT msgsz;
+			u16 qtype;
+			u16 msgsz;
 			PPSEUDO_HDR ppseudo_hdr;
-			PUSHORT pmsg;
-			USHORT total_len;
-			USHORT app_index;
+			u16 *pmsg;
+			u16 total_len;
+			u16 app_index;
 			u16 status;

 			//DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_SET_DPRAM called\n");
@@ -818,9 +818,9 @@ static long ft1000_ChIoctl(struct file *File,
unsigned int Command,
 						if ((msgsz < MAX_CMD_SQSIZE)
 						    && (msgsz > PSEUDOSZ)) {
 							// Need to put sequence number plus new checksum for message
-							//pmsg = (PUSHORT)&dpram_command.dpram_blk.pseudohdr;
+							//pmsg = (u16 *)&dpram_command.dpram_blk.pseudohdr;
 							pmsg =
-							    (PUSHORT) &
+							    (u16 *) &
 							    dpram_data.
 							    pseudohdr;
 							ppseudo_hdr =
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 3594521..b9b5ab2 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -133,20 +133,20 @@ typedef struct _DSP_IMAGE_INFO_V6 {

 u16 ft1000_read_register(struct ft1000_device *ft1000dev, short *Data,
 			 u16 nRegIndx);
-u16 ft1000_write_register(struct ft1000_device *ft1000dev, USHORT value,
+u16 ft1000_write_register(struct ft1000_device *ft1000dev, u16 value,
 			  u16 nRegIndx);
-u16 ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx,
-			PUCHAR buffer, USHORT cnt);
-u16 ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx,
-			 PUCHAR buffer, USHORT cnt);
-u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, USHORT indx,
-			PUCHAR buffer, u8 highlow);
-u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, USHORT indx,
-			 USHORT value, u8 highlow);
-u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx,
-			    PUCHAR buffer);
-u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx,
-			     PUCHAR buffer);
+u16 ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx,
+			u8 *buffer, u16 cnt);
+u16 ft1000_write_dpram32(struct ft1000_device *ft1000dev, u16 indx,
+			 u8 *buffer, u16 cnt);
+u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, u16 indx,
+			u8 *buffer, u8 highlow);
+u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, u16 indx,
+			 u16 value, u8 highlow);
+u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx,
+			    u8 *buffer);
+u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, u16 indx,
+			     u8 *buffer);

 //---------------------------------------------------------------------------
 // Function:    check_usb_db
@@ -160,11 +160,11 @@ u16 fix_ft1000_write_dpram32(struct
ft1000_device *ft1000dev, USHORT indx,
 // Notes:
 //
 //---------------------------------------------------------------------------
-ULONG check_usb_db(struct ft1000_device * ft1000dev)
+u32 check_usb_db(struct ft1000_device * ft1000dev)
 {
 	int loopcnt;
-	USHORT temp;
-	ULONG status;
+	u16 temp;
+	u32 status;

 	loopcnt = 0;
 	while (loopcnt < 10) {
@@ -232,7 +232,7 @@ ULONG check_usb_db(struct ft1000_device * ft1000dev)
 // Function:    get_handshake
 //
 // Parameters:  struct ft1000_device  - device structure
-//              USHORT expected_value - the handshake value expected
+//              u16 expected_value - the handshake value expected
 //
 // Returns:     handshakevalue - success
 //              HANDSHAKE_TIMEOUT_VALUE - failure
@@ -242,11 +242,11 @@ ULONG check_usb_db(struct ft1000_device * ft1000dev)
 // Notes:
 //
 //---------------------------------------------------------------------------
-USHORT get_handshake(struct ft1000_device * ft1000dev, USHORT expected_value)
+u16 get_handshake(struct ft1000_device * ft1000dev, u16 expected_value)
 {
-	USHORT handshake;
+	u16 handshake;
 	int loopcnt;
-	ULONG status = 0;
+	u32 status = 0;
 	PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);

 	loopcnt = 0;
@@ -275,7 +275,7 @@ USHORT get_handshake(struct ft1000_device *
ft1000dev, USHORT expected_value)

 		status =
 		    ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_HANDSHAKE_LOC,
-					(PUCHAR) & handshake, 1);
+					(u8 *) & handshake, 1);
 		//DEBUG("get_handshake: handshake is %x\n", tempx);
 		handshake = ntohs(handshake);
 		//DEBUG("get_handshake: after swap, handshake is %x\n", handshake);
@@ -322,7 +322,7 @@ USHORT get_handshake(struct ft1000_device *
ft1000dev, USHORT expected_value)
 			status =
 			    ft1000_read_dpram16(ft1000dev,
 						DWNLD_MAG1_HANDSHAKE_LOC,
-						(PUCHAR) & handshake, 1);
+						(u8 *) & handshake, 1);
 			//DEBUG("get_handshake: handshake is %x\n", tempx);
 			handshake = ntohs(handshake);
 			//DEBUG("get_handshake: after swap, handshake is %x\n", handshake);
@@ -354,7 +354,7 @@ USHORT get_handshake(struct ft1000_device *
ft1000dev, USHORT expected_value)
 // Function:    put_handshake
 //
 // Parameters:  struct ft1000_device  - device structure
-//              USHORT handshake_value - handshake to be written
+//              u16 handshake_value - handshake to be written
 //
 // Returns:     none
 //
@@ -364,21 +364,21 @@ USHORT get_handshake(struct ft1000_device *
ft1000dev, USHORT expected_value)
 // Notes:
 //
 //---------------------------------------------------------------------------
-void put_handshake(struct ft1000_device *ft1000dev, USHORT handshake_value)
+void put_handshake(struct ft1000_device *ft1000dev, u16 handshake_value)
 {
-	ULONG tempx;
-	USHORT tempword;
+	u32 tempx;
+	u16 tempword;
 	int i;
-	ULONG status;
+	u32 status;

-	tempx = (ULONG) handshake_value;
+	tempx = (u32) handshake_value;
 	tempx = ntohl(tempx);

-	tempword = (USHORT) (tempx & 0xffff);
+	tempword = (u16) (tempx & 0xffff);
 	status =
 	    ft1000_write_dpram16(ft1000dev, DWNLD_MAG1_HANDSHAKE_LOC, tempword,
 				 0);
-	tempword = (USHORT) (tempx >> 16);
+	tempword = (u16) (tempx >> 16);
 	status =
 	    ft1000_write_dpram16(ft1000dev, DWNLD_MAG1_HANDSHAKE_LOC, tempword,
 				 1);
@@ -406,12 +406,12 @@ void put_handshake(struct ft1000_device
*ft1000dev, USHORT handshake_value)

 }

-USHORT get_handshake_usb(struct ft1000_device *ft1000dev, USHORT
expected_value)
+u16 get_handshake_usb(struct ft1000_device *ft1000dev, u16 expected_value)
 {
-	USHORT handshake;
+	u16 handshake;
 	int loopcnt;
-	USHORT temp;
-	ULONG status = 0;
+	u16 temp;
+	u32 status = 0;

 	PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
 	loopcnt = 0;
@@ -420,7 +420,7 @@ USHORT get_handshake_usb(struct ft1000_device
*ft1000dev, USHORT expected_value)
 		if (pft1000info->usbboot == 2) {
 			status =
 			    ft1000_read_dpram32(ft1000dev, 0,
-						(PUCHAR) & (pft1000info->
+						(u8 *) & (pft1000info->
 							    tempbuf[0]), 64);
 			for (temp = 0; temp < 16; temp++)
 				DEBUG("tempbuf %d = 0x%x\n", temp,
@@ -428,7 +428,7 @@ USHORT get_handshake_usb(struct ft1000_device
*ft1000dev, USHORT expected_value)
 			status =
 			    ft1000_read_dpram16(ft1000dev,
 						DWNLD_MAG1_HANDSHAKE_LOC,
-						(PUCHAR) & handshake, 1);
+						(u8 *) & handshake, 1);
 			DEBUG("handshake from read_dpram16 = 0x%x\n",
 			      handshake);
 			if (pft1000info->dspalive == pft1000info->tempbuf[6])
@@ -441,7 +441,7 @@ USHORT get_handshake_usb(struct ft1000_device
*ft1000dev, USHORT expected_value)
 			status =
 			    ft1000_read_dpram16(ft1000dev,
 						DWNLD_MAG1_HANDSHAKE_LOC,
-						(PUCHAR) & handshake, 1);
+						(u8 *) & handshake, 1);
 		}
 		loopcnt++;
 		msleep(10);
@@ -455,7 +455,7 @@ USHORT get_handshake_usb(struct ft1000_device
*ft1000dev, USHORT expected_value)
 	return HANDSHAKE_TIMEOUT_VALUE;
 }

-void put_handshake_usb(struct ft1000_device *ft1000dev, USHORT handshake_value)
+void put_handshake_usb(struct ft1000_device *ft1000dev, u16 handshake_value)
 {
 	int i;

@@ -474,18 +474,18 @@ void put_handshake_usb(struct ft1000_device
*ft1000dev, USHORT handshake_value)
 // Notes:
 //
 //---------------------------------------------------------------------------
-USHORT get_request_type(struct ft1000_device *ft1000dev)
+u16 get_request_type(struct ft1000_device *ft1000dev)
 {
-	USHORT request_type;
-	ULONG status;
-	USHORT tempword;
-	ULONG tempx;
+	u16 request_type;
+	u32 status;
+	u16 tempword;
+	u32 tempx;
 	PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);

 	if (pft1000info->bootmode == 1) {
 		status =
 		    fix_ft1000_read_dpram32(ft1000dev, DWNLD_MAG1_TYPE_LOC,
-					    (PUCHAR) & tempx);
+					    (u8 *) & tempx);
 		tempx = ntohl(tempx);
 	} else {
 #if FIFO_DNLD
@@ -493,33 +493,33 @@ USHORT get_request_type(struct ft1000_device *ft1000dev)
 #else
 		status =
 		    ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_TYPE_LOC,
-					(PUCHAR) & tempword, 0);
+					(u8 *) & tempword, 0);
 		tempx = tempword;
 #endif
 		status =
 		    ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_TYPE_LOC,
-					(PUCHAR) & tempword, 1);
+					(u8 *) & tempword, 1);
 		tempx |= (tempword << 16);
 		tempx = ntohl(tempx);
 	}
-	request_type = (USHORT) tempx;
+	request_type = (u16) tempx;

 	//DEBUG("get_request_type: request_type is %x\n", request_type);
 	return request_type;

 }

-USHORT get_request_type_usb(struct ft1000_device * ft1000dev)
+u16 get_request_type_usb(struct ft1000_device * ft1000dev)
 {
-	USHORT request_type;
-	ULONG status;
-	USHORT tempword;
-	ULONG tempx;
+	u16 request_type;
+	u32 status;
+	u16 tempword;
+	u32 tempx;
 	PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);
 	if (pft1000info->bootmode == 1) {
 		status =
 		    fix_ft1000_read_dpram32(ft1000dev, DWNLD_MAG1_TYPE_LOC,
-					    (PUCHAR) & tempx);
+					    (u8 *) & tempx);
 		tempx = ntohl(tempx);
 	} else {
 		if (pft1000info->usbboot == 2) {
@@ -529,12 +529,12 @@ USHORT get_request_type_usb(struct ft1000_device
* ft1000dev)
 			tempx = 0;
 			status =
 			    ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_TYPE_LOC,
-						(PUCHAR) & tempword, 1);
+						(u8 *) & tempword, 1);
 		}
 		tempx |= (tempword << 16);
 		tempx = ntohl(tempx);
 	}
-	request_type = (USHORT) tempx;
+	request_type = (u16) tempx;

 	//DEBUG("get_request_type: request_type is %x\n", request_type);
 	return request_type;
@@ -555,24 +555,24 @@ USHORT get_request_type_usb(struct ft1000_device
* ft1000dev)
 //---------------------------------------------------------------------------
 long get_request_value(struct ft1000_device *ft1000dev)
 {
-	ULONG value;
-	USHORT tempword;
-	ULONG status;
+	u32 value;
+	u16 tempword;
+	u32 status;
 	PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);

 	if (pft1000info->bootmode == 1) {
 		status =
 		    fix_ft1000_read_dpram32(ft1000dev, DWNLD_MAG1_SIZE_LOC,
-					    (PUCHAR) & value);
+					    (u8 *) & value);
 		value = ntohl(value);
 	} else {
 		status =
 		    ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_SIZE_LOC,
-					(PUCHAR) & tempword, 0);
+					(u8 *) & tempword, 0);
 		value = tempword;
 		status =
 		    ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_SIZE_LOC,
-					(PUCHAR) & tempword, 1);
+					(u8 *) & tempword, 1);
 		value |= (tempword << 16);
 		value = ntohl(value);
 	}
@@ -584,9 +584,9 @@ long get_request_value(struct ft1000_device *ft1000dev)

 long get_request_value_usb(struct ft1000_device *ft1000dev)
 {
-	ULONG value;
-	USHORT tempword;
-	ULONG status;
+	u32 value;
+	u16 tempword;
+	u32 status;
 	PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);

 	if (pft1000info->usbboot == 2) {
@@ -596,7 +596,7 @@ long get_request_value_usb(struct ft1000_device *ft1000dev)
 		value = 0;
 		status =
 		    ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_SIZE_LOC,
-					(PUCHAR) & tempword, 1);
+					(u8 *) & tempword, 1);
 	}

 	value |= (tempword << 16);
@@ -627,13 +627,13 @@ long get_request_value_usb(struct ft1000_device
*ft1000dev)
 //---------------------------------------------------------------------------
 void put_request_value(struct ft1000_device *ft1000dev, long lvalue)
 {
-	ULONG tempx;
-	ULONG status;
+	u32 tempx;
+	u32 status;

 	tempx = ntohl(lvalue);
 	status =
 	    fix_ft1000_write_dpram32(ft1000dev, DWNLD_MAG1_SIZE_LOC,
-				     (PUCHAR) & tempx);
+				     (u8 *) & tempx);

 	//DEBUG("put_request_value: value is %x\n", lvalue);

@@ -651,10 +651,10 @@ void put_request_value(struct ft1000_device
*ft1000dev, long lvalue)
 // Notes:
 //
 //---------------------------------------------------------------------------
-USHORT hdr_checksum(PPSEUDO_HDR pHdr)
+u16 hdr_checksum(PPSEUDO_HDR pHdr)
 {
-	USHORT *usPtr = (USHORT *) pHdr;
-	USHORT chksum;
+	u16 *usPtr = (u16 *) pHdr;
+	u16 chksum;

 	chksum = ((((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^
 		    usPtr[4]) ^ usPtr[5]) ^ usPtr[6]);
@@ -666,8 +666,8 @@ USHORT hdr_checksum(PPSEUDO_HDR pHdr)
 // Function:    write_blk
 //
 // Parameters:  struct ft1000_device  - device structure
-//              USHORT **pUsFile - DSP image file pointer in USHORT
-//              UCHAR  **pUcFile - DSP image file pointer in UCHAR
+//              u16 **pUsFile - DSP image file pointer in u16
+//              u8  **pUcFile - DSP image file pointer in u8
 //              long   word_length - lenght of the buffer to be written
 //                                   to DPRAM
 //
@@ -679,21 +679,21 @@ USHORT hdr_checksum(PPSEUDO_HDR pHdr)
 // Notes:
 //
 //---------------------------------------------------------------------------
-ULONG write_blk(struct ft1000_device * ft1000dev, USHORT ** pUsFile,
-		UCHAR ** pUcFile, long word_length)
+u32 write_blk(struct ft1000_device * ft1000dev, u16 ** pUsFile,
+		u8 ** pUcFile, long word_length)
 {
-	ULONG Status = STATUS_SUCCESS;
-	USHORT dpram;
+	u32 Status = STATUS_SUCCESS;
+	u16 dpram;
 	long temp_word_length;
 	int loopcnt, i, j;
-	USHORT *pTempFile;
-	USHORT tempword;
-	USHORT tempbuffer[64];
-	USHORT resultbuffer[64];
+	u16 *pTempFile;
+	u16 tempword;
+	u16 tempbuffer[64];
+	u16 resultbuffer[64];
 	PFT1000_INFO pft1000info = netdev_priv(ft1000dev->net);

 	//DEBUG("FT1000:download:start word_length = %d\n",(int)word_length);
-	dpram = (USHORT) DWNLD_MAG1_PS_HDR_LOC;
+	dpram = (u16) DWNLD_MAG1_PS_HDR_LOC;
 	tempword = *(*pUsFile);
 	(*pUsFile)++;
 	Status = ft1000_write_dpram16(ft1000dev, dpram, tempword, 0);
@@ -703,7 +703,7 @@ ULONG write_blk(struct ft1000_device * ft1000dev,
USHORT ** pUsFile,

 	*pUcFile = *pUcFile + 4;
 	word_length--;
-	tempword = (USHORT) word_length;
+	tempword = (u16) word_length;
 	word_length = (word_length / 16) + 1;
 	pTempFile = *pUsFile;
 	temp_word_length = word_length;
@@ -732,18 +732,18 @@ ULONG write_blk(struct ft1000_device *
ft1000dev, USHORT ** pUsFile,
 			if (dpram >= 0x3F4)
 				Status =
 				    ft1000_write_dpram32(ft1000dev, dpram,
-							 (PUCHAR) &
+							 (u8 *) &
 							 tempbuffer[0], 8);
 			else
 				Status =
 				    ft1000_write_dpram32(ft1000dev, dpram,
-							 (PUCHAR) &
+							 (u8 *) &
 							 tempbuffer[0], 64);
 		} else {
 			for (j = 0; j < 10; j++) {
 				Status =
 				    ft1000_write_dpram32(ft1000dev, dpram,
-							 (PUCHAR) &
+							 (u8 *) &
 							 tempbuffer[0], 64);
 				if (Status == STATUS_SUCCESS) {
 					// Work around for ASIC bit stuffing problem.
@@ -751,14 +751,14 @@ ULONG write_blk(struct ft1000_device *
ft1000dev, USHORT ** pUsFile,
 						Status =
 						    ft1000_write_dpram32
 						    (ft1000dev, dpram + 12,
-						     (PUCHAR) & tempbuffer[24],
+						     (u8 *) & tempbuffer[24],
 						     64);
 					}
 					// Let's check the data written
 					Status =
 					    ft1000_read_dpram32(ft1000dev,
 								dpram,
-								(PUCHAR) &
+								(u8 *) &
 								resultbuffer[0],
 								64);
 					if ((tempbuffer[31] & 0xfe00) == 0xfe00) {
@@ -777,7 +777,7 @@ ULONG write_blk(struct ft1000_device * ft1000dev,
USHORT ** pUsFile,
 						Status =
 						    ft1000_read_dpram32
 						    (ft1000dev, dpram + 12,
-						     (PUCHAR) & resultbuffer[0],
+						     (u8 *) & resultbuffer[0],
 						     64);
 						for (i = 0; i < 16; i++) {
 							if (resultbuffer[i] !=
@@ -836,8 +836,8 @@ static void usb_dnld_complete(struct urb *urb)
 // Function:    write_blk_fifo
 //
 // Parameters:  struct ft1000_device  - device structure
-//              USHORT **pUsFile - DSP image file pointer in USHORT
-//              UCHAR  **pUcFile - DSP image file pointer in UCHAR
+//              u16 **pUsFile - DSP image file pointer in u16
+//              u8  **pUcFile - DSP image file pointer in u8
 //              long   word_length - lenght of the buffer to be written
 //                                   to DPRAM
 //
@@ -849,10 +849,10 @@ static void usb_dnld_complete(struct urb *urb)
 // Notes:
 //
 //---------------------------------------------------------------------------
-ULONG write_blk_fifo(struct ft1000_device *ft1000dev, USHORT ** pUsFile,
-		     UCHAR ** pUcFile, long word_length)
+u32 write_blk_fifo(struct ft1000_device *ft1000dev, u16 ** pUsFile,
+		     u8 ** pUcFile, long word_length)
 {
-	ULONG Status = STATUS_SUCCESS;
+	u32 Status = STATUS_SUCCESS;
 	int byte_length;
 	long aligncnt;

@@ -916,38 +916,38 @@ ULONG write_blk_fifo(struct ft1000_device
*ft1000dev, USHORT ** pUsFile,
 //---------------------------------------------------------------------------

 u16 scram_dnldr(struct ft1000_device * ft1000dev, void *pFileStart,
-		ULONG FileLength)
+		u32 FileLength)
 {
 	u16 Status = STATUS_SUCCESS;
-	UINT uiState;
-	USHORT handshake;
+	u32 uiState;
+	u16 handshake;
 	PPSEUDO_HDR pHdr;
-	USHORT usHdrLength;
+	u16 usHdrLength;
 	//PPROV_RECORD            pProvRecord;
 	PDSP_FILE_HDR pFileHdr;
 	long word_length;
-	USHORT request;
-	USHORT temp;
-	USHORT tempword;
+	u16 request;
+	u16 temp;
+	u16 tempword;

 	PDSP_FILE_HDR_5 pFileHdr5;
 	PDSP_IMAGE_INFO_V6 pDspImageInfoV6 = NULL;
 	long requested_version;
-	BOOLEAN bGoodVersion;
+	bool bGoodVersion;
 	PDRVMSG pMailBoxData;
-	USHORT *pUsData = NULL;
-	USHORT *pUsFile = NULL;
-	UCHAR *pUcFile = NULL;
-	UCHAR *pBootEnd = NULL, *pCodeEnd = NULL;
+	u16 *pUsData = NULL;
+	u16 *pUsFile = NULL;
+	u8 *pUcFile = NULL;
+	u8 *pBootEnd = NULL, *pCodeEnd = NULL;
 	int imageN;
 	long loader_code_address, loader_code_size = 0;
 	long run_address = 0, run_size = 0;

-	ULONG templong;
-	ULONG image_chksum = 0;
+	u32 templong;
+	u32 image_chksum = 0;

-	USHORT dpram = 0;
-	PUCHAR pbuffer;
+	u16 dpram = 0;
+	u8 *pbuffer;
 	PPROV_RECORD pprov_record;
 	FT1000_INFO *pft1000info = netdev_priv(ft1000dev->net);

@@ -968,10 +968,10 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,

 	ft1000_write_register(ft1000dev, 0x800, FT1000_REG_MAG_WATERMARK);

-	pUsFile = (USHORT *) (pFileStart + pFileHdr5->loader_offset);
-	pUcFile = (UCHAR *) (pFileStart + pFileHdr5->loader_offset);
+	pUsFile = (u16 *) (pFileStart + pFileHdr5->loader_offset);
+	pUcFile = (u8 *) (pFileStart + pFileHdr5->loader_offset);

-	pBootEnd = (UCHAR *) (pFileStart + pFileHdr5->loader_code_end);
+	pBootEnd = (u8 *) (pFileStart + pFileHdr5->loader_code_end);

 	loader_code_address = pFileHdr5->loader_code_address;
 	loader_code_size = pFileHdr5->loader_code_size;
@@ -1028,8 +1028,8 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 				case REQUEST_DONE_BL:
 					DEBUG("FT1000:REQUEST_DONE_BL\n");
 					/* Reposition ptrs to beginning of code section */
-					pUsFile = (USHORT *) (pBootEnd);
-					pUcFile = (UCHAR *) (pBootEnd);
+					pUsFile = (u16 *) (pBootEnd);
+					pUcFile = (u8 *) (pBootEnd);
 					//DEBUG("FT1000:download:pUsFile = 0x%8x\n", (int)pUsFile);
 					//DEBUG("FT1000:download:pUcFile = 0x%8x\n", (int)pUcFile);
 					uiState = STATE_CODE_DWNLD;
@@ -1061,7 +1061,7 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 					/*
 					 * Position ASIC DPRAM auto-increment pointer.
 					 */
-					dpram = (USHORT) DWNLD_MAG1_PS_HDR_LOC;
+					dpram = (u16) DWNLD_MAG1_PS_HDR_LOC;
 					if (word_length & 0x1)
 						word_length++;
 					word_length = word_length / 2;
@@ -1157,11 +1157,11 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 #endif
 					/* Reposition ptrs to beginning of provisioning section */
 					pUsFile =
-					    (USHORT *) (pFileStart +
+					    (u16 *) (pFileStart +
 							pFileHdr5->
 							commands_offset);
 					pUcFile =
-					    (UCHAR *) (pFileStart +
+					    (u8 *) (pFileStart +
 						       pFileHdr5->
 						       commands_offset);
 					uiState = STATE_DONE_DWNLD;
@@ -1205,7 +1205,7 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 					/*
 					 * Position ASIC DPRAM auto-increment pointer.
 					 */
-					dpram = (USHORT) DWNLD_MAG1_PS_HDR_LOC;
+					dpram = (u16) DWNLD_MAG1_PS_HDR_LOC;
 					if (word_length & 0x1)
 						word_length++;
 					word_length = word_length / 2;
@@ -1225,7 +1225,7 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 #else
 					write_blk(ft1000dev, &pUsFile, &pUcFile,
 						  word_length);
-					//ft1000_write_dpram32 (ft1000dev, dpram, (PUCHAR)pUcFile, word_length);
+					//ft1000_write_dpram32 (ft1000dev, dpram, (u8 *)pUcFile, word_length);
 #endif
 					break;

@@ -1246,8 +1246,8 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 					 */

 					pUsData =
-					    (USHORT *) & pMailBoxData->data[0];
-					dpram = (USHORT) DWNLD_MAG1_PS_HDR_LOC;
+					    (u16 *) & pMailBoxData->data[0];
+					dpram = (u16) DWNLD_MAG1_PS_HDR_LOC;
 					if (word_length & 0x1)
 						word_length++;

@@ -1260,7 +1260,7 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 						Status =
 						    fix_ft1000_write_dpram32
 						    (ft1000dev, dpram++,
-						     (PUCHAR) & templong);
+						     (u8 *) & templong);

 					}
 					break;
@@ -1277,11 +1277,11 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 					 */

 					pUsFile =
-					    (USHORT *) (pFileStart +
+					    (u16 *) (pFileStart +
 							pFileHdr5->
 							version_data_offset);

-					dpram = (USHORT) DWNLD_MAG1_PS_HDR_LOC;
+					dpram = (u16) DWNLD_MAG1_PS_HDR_LOC;
 					if (word_length & 0x1)
 						word_length++;

@@ -1295,7 +1295,7 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 						Status =
 						    fix_ft1000_write_dpram32
 						    (ft1000dev, dpram++,
-						     (PUCHAR) & templong);
+						     (u8 *) & templong);

 					}
 					break;
@@ -1317,31 +1317,28 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 					     imageN++) {

 						temp =
-						    (USHORT) (pDspImageInfoV6->
+						    (u16) (pDspImageInfoV6->
 							      version);
 						templong = temp;
 						temp =
-						    (USHORT) (pDspImageInfoV6->
+						    (u16) (pDspImageInfoV6->
 							      version >> 16);
 						templong |= (temp << 16);
 						if (templong ==
-						    (ULONG) requested_version) {
+						    (u32) requested_version) {
 							bGoodVersion = TRUE;
 							DEBUG
 							    ("FT1000:download: bGoodVersion is TRUE\n");
 							pUsFile =
-							    (USHORT
-							     *) (pFileStart +
+							    (u16 *) (pFileStart +
 								 pDspImageInfoV6->
 								 begin_offset);
 							pUcFile =
-							    (UCHAR
-							     *) (pFileStart +
+							    (u8 *) (pFileStart +
 								 pDspImageInfoV6->
 								 begin_offset);
 							pCodeEnd =
-							    (UCHAR
-							     *) (pFileStart +
+							    (u8 *) (pFileStart +
 								 pDspImageInfoV6->
 								 end_offset);
 							run_address =
@@ -1351,7 +1348,7 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 							    pDspImageInfoV6->
 							    image_size;
 							image_chksum =
-							    (ULONG)
+							    (u32)
 							    pDspImageInfoV6->
 							    checksum;
 							break;
@@ -1415,7 +1412,7 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 					    GFP_ATOMIC);
 				if (pbuffer) {
 					memcpy(pbuffer, (void *)pUcFile,
-					       (UINT) (usHdrLength +
+					       (u32) (usHdrLength +
 						       sizeof(PSEUDO_HDR)));
 					// link provisioning data
 					pprov_record =
@@ -1430,11 +1427,11 @@ u16 scram_dnldr(struct ft1000_device *
ft1000dev, void *pFileStart,
 							      prov_list);
 						// Move to next entry if available
 						pUcFile =
-						    (UCHAR *) ((UINT) pUcFile +
-							       (UINT) ((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(PSEUDO_HDR));
-						if ((UINT) (pUcFile) -
-						    (UINT) (pFileStart) >=
-						    (UINT) FileLength) {
+						    (u8 *) ((u32) pUcFile +
+							       (u32) ((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(PSEUDO_HDR));
+						if ((u32) (pUcFile) -
+						    (u32) (pFileStart) >=
+						    (u32) FileLength) {
 							uiState =
 							    STATE_DONE_FILE;
 						}
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 1d9a799..93a7e66 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -36,7 +36,7 @@
 //#define JDEBUG

 extern void *pFileStart;
-extern ULONG FileLength;
+extern u32 FileLength;

 extern int numofmsgbuf;

@@ -49,7 +49,7 @@ static int ft1000_open(struct net_device *dev);
 int ft1000_close(struct net_device *dev);
 static struct net_device_stats *ft1000_netdev_stats(struct net_device *dev);
 u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart,
-		ULONG FileLength);
+		u32 FileLength);
 int ft1000_submit_rx_urb(PFT1000_INFO info);
 static struct timer_list poll_timer[MAX_NUM_CARDS];
 static int ft1000_chkcard(struct ft1000_device *dev);
@@ -228,7 +228,7 @@ u16 ft1000_read_register(struct ft1000_device *
ft1000dev, short *Data,
 // Notes:
 //
 //---------------------------------------------------------------------------
-u16 ft1000_write_register(struct ft1000_device * ft1000dev, USHORT value,
+u16 ft1000_write_register(struct ft1000_device * ft1000dev, u16 value,
 			  u16 nRegIndx)
 {
 	u16 ret = STATUS_SUCCESS;
@@ -262,8 +262,8 @@ u16 ft1000_write_register(struct ft1000_device *
ft1000dev, USHORT value,
 //
 //---------------------------------------------------------------------------

-u16 ft1000_read_dpram32(struct ft1000_device * ft1000dev, USHORT indx,
-			PUCHAR buffer, USHORT cnt)
+u16 ft1000_read_dpram32(struct ft1000_device * ft1000dev, u16 indx,
+			u8 *buffer, u16 cnt)
 {
 	u16 ret = STATUS_SUCCESS;

@@ -302,8 +302,8 @@ u16 ft1000_read_dpram32(struct ft1000_device *
ft1000dev, USHORT indx,
 // Notes:
 //
 //---------------------------------------------------------------------------
-u16 ft1000_write_dpram32(struct ft1000_device * ft1000dev, USHORT indx,
-			 PUCHAR buffer, USHORT cnt)
+u16 ft1000_write_dpram32(struct ft1000_device * ft1000dev, u16 indx,
+			 u8 *buffer, u16 cnt)
 {
 	u16 ret = STATUS_SUCCESS;

@@ -341,8 +341,8 @@ u16 ft1000_write_dpram32(struct ft1000_device *
ft1000dev, USHORT indx,
 // Notes:
 //
 //---------------------------------------------------------------------------
-u16 ft1000_read_dpram16(struct ft1000_device * ft1000dev, USHORT indx,
-			PUCHAR buffer, u8 highlow)
+u16 ft1000_read_dpram16(struct ft1000_device * ft1000dev, u16 indx,
+			u8 *buffer, u8 highlow)
 {
 	u16 ret = STATUS_SUCCESS;

@@ -389,8 +389,8 @@ u16 ft1000_read_dpram16(struct ft1000_device *
ft1000dev, USHORT indx,
 // Notes:
 //
 //---------------------------------------------------------------------------
-u16 ft1000_write_dpram16(struct ft1000_device * ft1000dev, USHORT indx,
-			 USHORT value, u8 highlow)
+u16 ft1000_write_dpram16(struct ft1000_device * ft1000dev, u16 indx,
+			 u16 value, u8 highlow)
 {
 	u16 ret = STATUS_SUCCESS;

@@ -433,16 +433,16 @@ u16 ft1000_write_dpram16(struct ft1000_device *
ft1000dev, USHORT indx,
 // Notes:
 //
 //---------------------------------------------------------------------------
-u16 fix_ft1000_read_dpram32(struct ft1000_device * ft1000dev, USHORT indx,
-			    PUCHAR buffer)
+u16 fix_ft1000_read_dpram32(struct ft1000_device * ft1000dev, u16 indx,
+			    u8 *buffer)
 {
-	UCHAR tempbuffer[16];
-	USHORT pos;
+	u8 tempbuffer[16];
+	u16 pos;
 	u16 ret = STATUS_SUCCESS;

 	//DEBUG("fix_ft1000_read_dpram32: indx: %d  \n", indx);
 	pos = (indx / 4) * 4;
-	ret = ft1000_read_dpram32(ft1000dev, pos, (PUCHAR) & tempbuffer[0], 16);
+	ret = ft1000_read_dpram32(ft1000dev, pos, (u8 *) & tempbuffer[0], 16);
 	if (ret == STATUS_SUCCESS) {
 		pos = (indx % 4) * 4;
 		*buffer++ = tempbuffer[pos++];
@@ -479,15 +479,15 @@ u16 fix_ft1000_read_dpram32(struct ft1000_device
* ft1000dev, USHORT indx,
 // Notes:
 //
 //---------------------------------------------------------------------------
-u16 fix_ft1000_write_dpram32(struct ft1000_device * ft1000dev, USHORT indx,
-			     PUCHAR buffer)
+u16 fix_ft1000_write_dpram32(struct ft1000_device * ft1000dev, u16 indx,
+			     u8 *buffer)
 {
-	USHORT pos1;
-	USHORT pos2;
-	USHORT i;
-	UCHAR tempbuffer[32];
-	UCHAR resultbuffer[32];
-	PUCHAR pdata;
+	u16 pos1;
+	u16 pos2;
+	u16 i;
+	u8 tempbuffer[32];
+	u8 resultbuffer[32];
+	u8 *pdata;
 	u16 ret = STATUS_SUCCESS;

 	//DEBUG("fix_ft1000_write_dpram32: Entered:\n");
@@ -495,7 +495,7 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device
* ft1000dev, USHORT indx,
 	pos1 = (indx / 4) * 4;
 	pdata = buffer;
 	ret =
-	    ft1000_read_dpram32(ft1000dev, pos1, (PUCHAR) & tempbuffer[0], 16);
+	    ft1000_read_dpram32(ft1000dev, pos1, (u8 *) & tempbuffer[0], 16);
 	if (ret == STATUS_SUCCESS) {
 		pos2 = (indx % 4) * 4;
 		tempbuffer[pos2++] = *buffer++;
@@ -504,7 +504,7 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device
* ft1000dev, USHORT indx,
 		tempbuffer[pos2++] = *buffer++;
 		ret =
 		    ft1000_write_dpram32(ft1000dev, pos1,
-					 (PUCHAR) & tempbuffer[0], 16);
+					 (u8 *) & tempbuffer[0], 16);
 	} else {
 		DEBUG("fix_ft1000_write_dpram32: DPRAM32 Read failed\n");

@@ -512,7 +512,7 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device
* ft1000dev, USHORT indx,
 	}

 	ret =
-	    ft1000_read_dpram32(ft1000dev, pos1, (PUCHAR) & resultbuffer[0],
+	    ft1000_read_dpram32(ft1000dev, pos1, (u8 *) & resultbuffer[0],
 				16);
 	if (ret == STATUS_SUCCESS) {
 		buffer = pdata;
@@ -527,10 +527,10 @@ u16 fix_ft1000_write_dpram32(struct
ft1000_device * ft1000dev, USHORT indx,
 	if (ret == STATUS_FAILURE) {
 		ret =
 		    ft1000_write_dpram32(ft1000dev, pos1,
-					 (PUCHAR) & tempbuffer[0], 16);
+					 (u8 *) & tempbuffer[0], 16);
 		ret =
 		    ft1000_read_dpram32(ft1000dev, pos1,
-					(PUCHAR) & resultbuffer[0], 16);
+					(u8 *) & resultbuffer[0], 16);
 		if (ret == STATUS_SUCCESS) {
 			buffer = pdata;
 			for (i = 0; i < 16; i++) {
@@ -557,10 +557,10 @@ u16 fix_ft1000_write_dpram32(struct
ft1000_device * ft1000dev, USHORT indx,
 //
 //  Returns:    None
 //-----------------------------------------------------------------------
-void card_reset_dsp(struct ft1000_device *ft1000dev, BOOLEAN value)
+void card_reset_dsp(struct ft1000_device *ft1000dev, bool value)
 {
 	u16 status = STATUS_SUCCESS;
-	USHORT tempword;
+	u16 tempword;

 	status =
 	    ft1000_write_register(ft1000dev, HOST_INTF_BE, FT1000_REG_SUP_CTRL);
@@ -680,8 +680,8 @@ void CardSendCommand(struct ft1000_device *ft1000dev,
 void dsp_reload(struct ft1000_device *ft1000dev)
 {
 	u16 status;
-	USHORT tempword;
-	ULONG templong;
+	u16 tempword;
+	u32 templong;

 	PFT1000_INFO pft1000info;

@@ -712,7 +712,7 @@ void dsp_reload(struct ft1000_device *ft1000dev)
 	// Let's check for FEFE
 	status =
 	    ft1000_read_dpram32(ft1000dev, FT1000_MAG_DPRAM_FEFE_INDX,
-				(PUCHAR) & templong, 4);
+				(u8 *) & templong, 4);
 	DEBUG("templong (fefe) = 0x%8x\n", templong);

 	// call codeloader
@@ -872,7 +872,7 @@ static int ft1000_reset_card(struct net_device *dev)
 	for (i = 0; i < MAX_DSP_SESS_REC / 2; i++) {
 		//info->DSPSess.MagRec[i] = inl(dev->base_addr+FT1000_REG_MAG_DPDATA);
 		ft1000_read_dpram32(ft1000dev, FT1000_REG_MAG_DPDATA,
-				    (PCHAR) & (info->DSPSess.MagRec[i]), 4);
+				    (u8 *) & (info->DSPSess.MagRec[i]), 4);
 	}

 	spin_unlock_irqrestore(&info->dpram_lock, flags);
@@ -915,7 +915,7 @@ static int ft1000_reset_card(struct net_device *dev)
 	for (i = 0; i < 50; i++) {
 		//tempword = ft1000_read_dpram_mag_16(dev, FT1000_MAG_DPRAM_FEFE,
FT1000_MAG_DPRAM_FEFE_INDX);
 		ft1000_read_dpram32(ft1000dev, FT1000_MAG_DPRAM_FEFE_INDX,
-				    (PUCHAR) & templong, 4);
+				    (u8 *) & templong, 4);
 		if (tempword == 0xfefe) {
 			break;
 		}
@@ -940,7 +940,7 @@ static int ft1000_reset_card(struct net_device *dev)
 	// Initialize DSP heartbeat area to ho
 	ft1000_write_dpram16(ft1000dev, FT1000_MAG_HI_HO, ho_mag,
 			     FT1000_MAG_HI_HO_INDX);
-	ft1000_read_dpram16(ft1000dev, FT1000_MAG_HI_HO, (PCHAR) & tempword,
+	ft1000_read_dpram16(ft1000dev, FT1000_MAG_HI_HO, (u8 *) & tempword,
 			    FT1000_MAG_HI_HO_INDX);
 	DEBUG("ft1000_hw:ft1000_reset_card:hi_ho value = 0x%x\n", tempword);

@@ -1366,14 +1366,14 @@ static inline u16 ft1000_read_fifo_len(struct
net_device *dev)
 //              SUCCESS
 //
 //---------------------------------------------------------------------------
-int ft1000_copy_down_pkt(struct net_device *netdev, u8 * packet, u16 len)
+int ft1000_copy_down_pkt(struct net_device *netdev, u8 *packet, u16 len)
 {
 	FT1000_INFO *pInfo = netdev_priv(netdev);
 	struct ft1000_device *pFt1000Dev = pInfo->pFt1000Dev;

 	int i, count, ret;
-	USHORT *pTemp;
-	USHORT checksum;
+	u16 *pTemp;
+	u16 checksum;
 	u8 *t;

 	if (!pInfo->CardReady) {
@@ -1428,7 +1428,7 @@ int ft1000_copy_down_pkt(struct net_device
*netdev, u8 * packet, u16 len)
 	if (count % 4)
 		count = count + (4 - (count % 4));

-	pTemp = (PUSHORT) & (pFt1000Dev->tx_buf[0]);
+	pTemp = (u16 *) & (pFt1000Dev->tx_buf[0]);
 	*pTemp++ = ntohs(count);
 	*pTemp++ = 0x1020;
 	*pTemp++ = 0x2010;
@@ -1436,7 +1436,7 @@ int ft1000_copy_down_pkt(struct net_device
*netdev, u8 * packet, u16 len)
 	*pTemp++ = 0;
 	*pTemp++ = 0;
 	*pTemp++ = 0;
-	pTemp = (PUSHORT) & (pFt1000Dev->tx_buf[0]);
+	pTemp = (u16 *) & (pFt1000Dev->tx_buf[0]);
 	checksum = *pTemp++;
 	for (i = 1; i < 7; i++) {
 		checksum ^= *pTemp++;
@@ -1598,7 +1598,7 @@ int ft1000_copy_up_pkt(struct urb *urb)
 	//DEBUG("ft1000_copy_up_pkt: transfer_buffer_length=%d,
actual_buffer_len=%d\n",
 	//       urb->transfer_buffer_length, urb->actual_length);

-	chksum = (PUSHORT) ft1000dev->rx_buf;
+	chksum = (u16 *) ft1000dev->rx_buf;

 	tempword = *chksum++;
 	for (i = 1; i < 7; i++) {
@@ -1867,7 +1867,7 @@ static void ft1000_hbchk(u_long data)
 	struct ft1000_device *dev = (struct ft1000_device *)data;

 	FT1000_INFO *info;
-	USHORT tempword;
+	u16 tempword;
 	u16 status;
 	info = (FT1000_INFO *) netdev_priv(dev->net);

@@ -1878,19 +1878,19 @@ static void ft1000_hbchk(u_long data)
 		// Reset ASIC and DSP
 		status =
 		    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER0,
-					(PUCHAR) & (info->DSP_TIME[0]),
+					(u8 *) & (info->DSP_TIME[0]),
 					FT1000_MAG_DSP_TIMER0_INDX);
 		status =
 		    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER1,
-					(PUCHAR) & (info->DSP_TIME[1]),
+					(u8 *) & (info->DSP_TIME[1]),
 					FT1000_MAG_DSP_TIMER1_INDX);
 		status =
 		    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER2,
-					(PUCHAR) & (info->DSP_TIME[2]),
+					(u8 *) & (info->DSP_TIME[2]),
 					FT1000_MAG_DSP_TIMER2_INDX);
 		status =
 		    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER3,
-					(PUCHAR) & (info->DSP_TIME[3]),
+					(u8 *) & (info->DSP_TIME[3]),
 					FT1000_MAG_DSP_TIMER3_INDX);

 		info->DrvErrNum = DSP_CONDRESET_INFO;
@@ -1910,14 +1910,14 @@ static void ft1000_hbchk(u_long data)
 		// Perform dsp heartbeat check
 		status =
 		    ntohs(ft1000_read_dpram16
-			  (dev, FT1000_MAG_HI_HO, (PUCHAR) & tempword,
+			  (dev, FT1000_MAG_HI_HO, (u8 *) & tempword,
 			   FT1000_MAG_HI_HO_INDX));
 		DEBUG("ft1000_hw:ft1000_hbchk:hi_ho value = 0x%x\n", tempword);
 		// Let's perform another check if ho is not detected
 		if (tempword != ho) {
 			status =
 			    ntohs(ft1000_read_dpram16
-				  (dev, FT1000_MAG_HI_HO, (PUCHAR) & tempword,
+				  (dev, FT1000_MAG_HI_HO, (u8 *) & tempword,
 				   FT1000_MAG_HI_HO_INDX));
 		}
 		if (tempword != ho) {
@@ -1925,19 +1925,19 @@ static void ft1000_hbchk(u_long data)
 			       "ft1000: heartbeat failed - no ho detected\n");
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER0,
-						(PUCHAR) & (info->DSP_TIME[0]),
+						(u8 *) & (info->DSP_TIME[0]),
 						FT1000_MAG_DSP_TIMER0_INDX);
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER1,
-						(PUCHAR) & (info->DSP_TIME[1]),
+						(u8 *) & (info->DSP_TIME[1]),
 						FT1000_MAG_DSP_TIMER1_INDX);
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER2,
-						(PUCHAR) & (info->DSP_TIME[2]),
+						(u8 *) & (info->DSP_TIME[2]),
 						FT1000_MAG_DSP_TIMER2_INDX);
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER3,
-						(PUCHAR) & (info->DSP_TIME[3]),
+						(u8 *) & (info->DSP_TIME[3]),
 						FT1000_MAG_DSP_TIMER3_INDX);
 			info->DrvErrNum = DSP_HB_INFO;
 			if (ft1000_reset_card(dev->net) == 0) {
@@ -1967,19 +1967,19 @@ static void ft1000_hbchk(u_long data)
 			       "ft1000: heartbeat doorbell not clear by firmware\n");
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER0,
-						(PUCHAR) & (info->DSP_TIME[0]),
+						(u8 *) & (info->DSP_TIME[0]),
 						FT1000_MAG_DSP_TIMER0_INDX);
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER1,
-						(PUCHAR) & (info->DSP_TIME[1]),
+						(u8 *) & (info->DSP_TIME[1]),
 						FT1000_MAG_DSP_TIMER1_INDX);
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER2,
-						(PUCHAR) & (info->DSP_TIME[2]),
+						(u8 *) & (info->DSP_TIME[2]),
 						FT1000_MAG_DSP_TIMER2_INDX);
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER3,
-						(PUCHAR) & (info->DSP_TIME[3]),
+						(u8 *) & (info->DSP_TIME[3]),
 						FT1000_MAG_DSP_TIMER3_INDX);
 			info->DrvErrNum = DSP_HB_INFO;
 			if (ft1000_reset_card(dev->net) == 0) {
@@ -2002,7 +2002,7 @@ static void ft1000_hbchk(u_long data)

 		status =
 		    ntohs(ft1000_read_dpram16
-			  (dev, FT1000_MAG_HI_HO, (PUCHAR) & tempword,
+			  (dev, FT1000_MAG_HI_HO, (u8 *) & tempword,
 			   FT1000_MAG_HI_HO_INDX));
 		// Let's write hi again if fail
 		if (tempword != hi) {
@@ -2010,7 +2010,7 @@ static void ft1000_hbchk(u_long data)
 					     FT1000_MAG_HI_HO_INDX);
 			status =
 			    ntohs(ft1000_read_dpram16
-				  (dev, FT1000_MAG_HI_HO, (PUCHAR) & tempword,
+				  (dev, FT1000_MAG_HI_HO, (u8 *) & tempword,
 				   FT1000_MAG_HI_HO_INDX));

 		}
@@ -2019,19 +2019,19 @@ static void ft1000_hbchk(u_long data)
 			       "ft1000: heartbeat failed - cannot write hi into DPRAM\n");
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER0,
-						(PUCHAR) & (info->DSP_TIME[0]),
+						(u8 *) & (info->DSP_TIME[0]),
 						FT1000_MAG_DSP_TIMER0_INDX);
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER1,
-						(PUCHAR) & (info->DSP_TIME[1]),
+						(u8 *) & (info->DSP_TIME[1]),
 						FT1000_MAG_DSP_TIMER1_INDX);
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER2,
-						(PUCHAR) & (info->DSP_TIME[2]),
+						(u8 *) & (info->DSP_TIME[2]),
 						FT1000_MAG_DSP_TIMER2_INDX);
 			status =
 			    ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER3,
-						(PUCHAR) & (info->DSP_TIME[3]),
+						(u8 *) & (info->DSP_TIME[3]),
 						FT1000_MAG_DSP_TIMER3_INDX);

 			info->DrvErrNum = DSP_HB_INFO;
@@ -2071,7 +2071,7 @@ static void ft1000_hbchk(u_long data)
 //          = 1 (successful)
 //
 //---------------------------------------------------------------------------
-BOOLEAN ft1000_receive_cmd(struct ft1000_device * dev, u16 * pbuffer,
int maxsz,
+bool ft1000_receive_cmd(struct ft1000_device * dev, u16 * pbuffer, int maxsz,
 			   u16 * pnxtph)
 {
 	u16 size, ret;
@@ -2080,7 +2080,7 @@ BOOLEAN ft1000_receive_cmd(struct ft1000_device
* dev, u16 * pbuffer, int maxsz,
 	u16 tempword;

 	ret =
-	    ft1000_read_dpram16(dev, FT1000_MAG_PH_LEN, (PUCHAR) & size,
+	    ft1000_read_dpram16(dev, FT1000_MAG_PH_LEN, (u8 *) & size,
 				FT1000_MAG_PH_LEN_INDX);
 	size = ntohs(size) + PSEUDOSZ;
 	if (size > maxsz) {
@@ -2167,9 +2167,9 @@ int ft1000_dsp_prov(void *arg)
 	u16 i = 0;
 	PPROV_RECORD ptr;
 	PPSEUDO_HDR ppseudo_hdr;
-	PUSHORT pmsg;
+	u16 *pmsg;
 	u16 status;
-	USHORT TempShortBuf[256];
+	u16 TempShortBuf[256];

 	DEBUG("*** DspProv Entered\n");

@@ -2208,7 +2208,7 @@ int ft1000_dsp_prov(void *arg)
 			len += PSEUDOSZ;
 			//len = htons(len);

-			pmsg = (PUSHORT) ptr->pprov_data;
+			pmsg = (u16 *) ptr->pprov_data;
 			ppseudo_hdr = (PPSEUDO_HDR) pmsg;
 			// Insert slow queue sequence number
 			ppseudo_hdr->seq_num = info->squeseqnum++;
@@ -2227,7 +2227,7 @@ int ft1000_dsp_prov(void *arg)

 			status =
 			    ft1000_write_dpram32(dev, 0,
-						 (PUCHAR) & TempShortBuf[0],
+						 (u8 *) & TempShortBuf[0],
 						 (unsigned short)(len + 2));
 			status =
 			    ft1000_write_register(dev, FT1000_DB_DPRAM_TX,
@@ -2261,7 +2261,7 @@ int ft1000_proc_drvmsg(struct ft1000_device
*dev, u16 size)
 	PDRVMSG pdrvmsg;
 	u16 i;
 	PPSEUDO_HDR ppseudo_hdr;
-	PUSHORT pmsg;
+	u16 *pmsg;
 	u16 status;
 	//struct timeval tv; //mbelian
 	union {
@@ -2271,7 +2271,7 @@ int ft1000_proc_drvmsg(struct ft1000_device
*dev, u16 size)

 	char cmdbuffer[1600];

-	status = ft1000_read_dpram32(dev, 0x200, (PUCHAR) & cmdbuffer[0], size);
+	status = ft1000_read_dpram32(dev, 0x200, (u8 *) & cmdbuffer[0], size);

 	//if (ft1000_receive_cmd(dev, &cmdbuffer[0], MAX_CMD_SQSIZE, &tempword))
 	{
@@ -2413,7 +2413,7 @@ int ft1000_proc_drvmsg(struct ft1000_device
*dev, u16 size)
 				tempword = ntohs(pdrvmsg->length);
 				info->DSPInfoBlklen = tempword;
 				if (tempword < (MAX_DSP_SESS_REC - 4)) {
-					pmsg = (PUSHORT) & pdrvmsg->data[0];
+					pmsg = (u16 *) & pdrvmsg->data[0];
 					for (i = 0; i < ((tempword + 1) / 2);
 					     i++) {
 						DEBUG
@@ -2455,13 +2455,13 @@ int ft1000_proc_drvmsg(struct ft1000_device
*dev, u16 size)
 				}
 				// Put message into Slow Queue
 				// Form Pseudo header
-				pmsg = (PUSHORT) info->DSPInfoBlk;
+				pmsg = (u16 *) info->DSPInfoBlk;
 				*pmsg++ = 0;
 				*pmsg++ =
 				    htons(info->DSPInfoBlklen + 20 +
 					  info->DSPInfoBlklen);
 				ppseudo_hdr =
-				    (PPSEUDO_HDR) (PUSHORT) & info->
+				    (PPSEUDO_HDR) (u16 *) & info->
 				    DSPInfoBlk[2];
 				ppseudo_hdr->length =
 				    htons(info->DSPInfoBlklen + 4 +
@@ -2489,7 +2489,7 @@ int ft1000_proc_drvmsg(struct ft1000_device
*dev, u16 size)
 				    htons(info->DSPInfoBlklen);
 				status =
 				    ft1000_write_dpram32(dev, 0,
-							 (PUCHAR) & info->
+							 (u8 *) & info->
 							 DSPInfoBlk[0],
 							 (unsigned short)(info->
 									  DSPInfoBlklen
@@ -2527,7 +2527,7 @@ int ft1000_proc_drvmsg(struct ft1000_device
*dev, u16 size)
 				if ((tempword & FT1000_DB_DPRAM_TX) == 0) {
 					// Put message into Slow Queue
 					// Form Pseudo header
-					pmsg = (PUSHORT) & tempbuffer[0];
+					pmsg = (u16 *) & tempbuffer[0];
 					ppseudo_hdr = (PPSEUDO_HDR) pmsg;
 					ppseudo_hdr->length = htons(0x0012);
 					ppseudo_hdr->source = 0x10;
@@ -2550,7 +2550,7 @@ int ft1000_proc_drvmsg(struct ft1000_device
*dev, u16 size)
 						ppseudo_hdr->checksum ^=
 						    *pmsg++;
 					}
-					pmsg = (PUSHORT) & tempbuffer[16];
+					pmsg = (u16 *) & tempbuffer[16];
 					*pmsg++ = htons(RSP_DRV_ERR_RPT_MSG);
 					*pmsg++ = htons(0x000e);
 					*pmsg++ = htons(info->DSP_TIME[0]);
@@ -2568,7 +2568,7 @@ int ft1000_proc_drvmsg(struct ft1000_device
*dev, u16 size)
 					CardSendCommand(dev,
 							(unsigned char *)
 							&tempbuffer[0],
-							(USHORT) (0x0012 +
+							(u16) (0x0012 +
 								  PSEUDOSZ));
 					info->DrvErrNum = 0;
 				}
@@ -2599,9 +2599,9 @@ int ft1000_poll(void *dev_id)
 	u16 status;
 	u16 size;
 	int i;
-	USHORT data;
-	USHORT modulo;
-	USHORT portid;
+	u16 data;
+	u16 modulo;
+	u16 portid;
 	u16 nxtph;
 	PDPRAM_BLK pdpram_blk;
 	PPSEUDO_HDR ppseudo_hdr;
@@ -2623,7 +2623,7 @@ int ft1000_poll(void *dev_id)
 			//DEBUG("ft1000_poll: FT1000_REG_DOORBELL message type:
FT1000_DB_DPRAM_RX\n");

 			status =
-			    ft1000_read_dpram16(dev, 0x200, (PUCHAR) & data, 0);
+			    ft1000_read_dpram16(dev, 0x200, (u8 *) & data, 0);
 			//DEBUG("ft1000_poll:FT1000_DB_DPRAM_RX:ft1000_read_dpram16:size =
0x%x\n", data);
 			size = ntohs(data) + 16 + 2;	//wai
 			if (size % 4) {
@@ -2631,7 +2631,7 @@ int ft1000_poll(void *dev_id)
 				size = size + modulo;
 			}
 			status =
-			    ft1000_read_dpram16(dev, 0x201, (PUCHAR) & portid,
+			    ft1000_read_dpram16(dev, 0x201, (u8 *) & portid,
 						1);
 			portid &= 0xff;
 			//DEBUG("ft1000_poll: FT1000_REG_DOORBELL message type:
FT1000_DB_DPRAM_RX : portid 0x%x\n", portid);
@@ -2861,7 +2861,7 @@ int ft1000_poll(void *dev_id)
 			// copy dsp session record from Adapter block
 			status =
 			    ft1000_write_dpram32(dev, 0,
-						 (PUCHAR) & info->DSPSess.
+						 (u8 *) & info->DSPSess.
 						 Rec[0], 1024);
 			// Program WMARK register
 			status =
@@ -2883,28 +2883,28 @@ int ft1000_poll(void *dev_id)
 				status =
 				    ft1000_read_dpram16(dev,
 							FT1000_MAG_DSP_TIMER0,
-							(PUCHAR) & (info->
+							(u8 *) & (info->
 								    DSP_TIME
 								    [0]),
 							FT1000_MAG_DSP_TIMER0_INDX);
 				status =
 				    ft1000_read_dpram16(dev,
 							FT1000_MAG_DSP_TIMER1,
-							(PUCHAR) & (info->
+							(u8 *) & (info->
 								    DSP_TIME
 								    [1]),
 							FT1000_MAG_DSP_TIMER1_INDX);
 				status =
 				    ft1000_read_dpram16(dev,
 							FT1000_MAG_DSP_TIMER2,
-							(PUCHAR) & (info->
+							(u8 *) & (info->
 								    DSP_TIME
 								    [2]),
 							FT1000_MAG_DSP_TIMER2_INDX);
 				status =
 				    ft1000_read_dpram16(dev,
 							FT1000_MAG_DSP_TIMER3,
-							(PUCHAR) & (info->
+							(u8 *) & (info->
 								    DSP_TIME
 								    [3]),
 							FT1000_MAG_DSP_TIMER3_INDX);
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.h
b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.h
index 8382167..0a3fc5a 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.h
@@ -4,9 +4,9 @@

 #include "ft1000_usb.h"

-extern u16 ft1000_read_register(struct usb_device *dev, PUSHORT Data,
+extern u16 ft1000_read_register(struct usb_device *dev, u16 *Data,
 				u8 nRegIndx);
-extern u16 ft1000_write_register(struct usb_device *dev, USHORT value,
+extern u16 ft1000_write_register(struct usb_device *dev, u16 value,
 				 u8 nRegIndx);

 #endif
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
index 4fc926d..3cb3504 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
@@ -32,8 +32,8 @@
 //#define FTNET_PROC proc_net
 //#endif

-u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, USHORT indx,
-			PUCHAR buffer, u8 highlow);
+u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, u16 indx,
+			u8 *buffer, u8 highlow);

 int
 ft1000ReadProc(char *page, char **start, off_t off, int count, int *eof,
@@ -68,12 +68,12 @@ ft1000ReadProc(char *page, char **start, off_t
off, int count, int *eof,

 	if (info->ProgConStat != 0xFF) {
 		ft1000_read_dpram16(info->pFt1000Dev, FT1000_MAG_DSP_LED,
-				    (PUCHAR) & ledStat,
+				    (u8 *) & ledStat,
 				    FT1000_MAG_DSP_LED_INDX);
 		info->LedStat = ntohs(ledStat);

 		ft1000_read_dpram16(info->pFt1000Dev, FT1000_MAG_DSP_CON_STATE,
-				    (PUCHAR) & conStat,
+				    (u8 *) & conStat,
 				    FT1000_MAG_DSP_CON_STATE_INDX);
 		info->ConStat = ntohs(conStat);
 		do_gettimeofday(&tv);
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
index 35b655d..2bd44f6 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
@@ -36,7 +36,7 @@ MODULE_LICENSE("Dual MPL/GPL");
 MODULE_SUPPORTED_DEVICE("QFT FT1000 Express Cards");

 void *pFileStart;
-ULONG FileLength;
+u32 FileLength;

 #define VENDOR_ID 0x1291	/* Qualcomm vendor id */
 #define PRODUCT_ID 0x11		/* fake product id */
@@ -59,11 +59,11 @@ u16 reg_ft1000_netdev(struct ft1000_device *ft1000dev,
 		      struct usb_interface *intf);
 int ft1000_poll(void *dev_id);
 void ft1000_DestroyDevice(struct net_device *dev);
-u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, USHORT indx,
-			PUCHAR buffer, u8 highlow);
+u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, u16 indx,
+			u8 *buffer, u8 highlow);
 u16 ft1000_read_register(struct ft1000_device *ft1000dev, short *Data,
 			 u16 nRegIndx);
-BOOLEAN gPollingfailed = FALSE;
+bool gPollingfailed = FALSE;

 void ft1000InitProc(struct net_device *dev);
 void ft1000CleanupProc(FT1000_INFO * info);
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
index bea6e95..6e80390 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
@@ -93,16 +93,6 @@ typedef struct _PROV_RECORD {

 #define DEBUG(args...) printk(KERN_INFO args)

-#define UCHAR               u8
-#define USHORT              u16
-#define ULONG               u32
-#define BOOLEAN             u8
-#define PULONG              u32 *
-#define PUSHORT             u16 *
-#define PUCHAR              u8 *
-#define PCHAR               u8 *
-#define UINT                u32
-
 #define FALSE           0
 #define TRUE            1

@@ -459,9 +449,9 @@ typedef struct _FT1000_INFO {
 	unsigned char usbboot;
 	unsigned short dspalive;
 	u16 ASIC_ID;
-	BOOLEAN fProvComplete;
-	BOOLEAN fCondResetPend;
-	BOOLEAN fAppMsgPend;
+	bool fProvComplete;
+	bool fCondResetPend;
+	bool fAppMsgPend;
 	char *pfwimg;
 	int fwimgsz;
 	u16 DrvErrNum;
-- 
1.7.1



More information about the devel mailing list