summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKelley Nielsen <kelleynnn@gmail.com>2013-10-29 08:08:06 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-29 08:36:17 -0700
commit8cf9ff570b73273c6439ade681466c87199a8104 (patch)
treeed3b292e1c200c0418c7ba2c4713e2f430b49ce4 /drivers
parent74827f8dfa52103db66c32958f2844abbcec92c5 (diff)
staging: ft1000: status variables changed to int in ft1000_download.c
Linux uses a return type of int for status codes. The file ft1000_download.c uses a mixture of u16 and u32. This patch changes all variables called status or Status to ints, whether they are returned from the function or not. It also changes the return type of all functions returning one of the variables to correspond. Also, the declaration of scram_dnldr has been changed in ft1000_usb.h. Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_download.c30
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_usb.h2
2 files changed, 16 insertions, 16 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 57bd87b91e3c..605156852b44 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -108,11 +108,11 @@ struct dsp_image_info {
/* checks if the doorbell register is cleared */
-static u32 check_usb_db(struct ft1000_usb *ft1000dev)
+static int check_usb_db(struct ft1000_usb *ft1000dev)
{
int loopcnt;
u16 temp;
- u32 status;
+ int status;
loopcnt = 0;
@@ -159,7 +159,7 @@ static u16 get_handshake(struct ft1000_usb *ft1000dev, u16 expected_value)
{
u16 handshake;
int loopcnt;
- u32 status = 0;
+ int status = 0;
loopcnt = 0;
@@ -206,7 +206,7 @@ static void put_handshake(struct ft1000_usb *ft1000dev,u16 handshake_value)
{
u32 tempx;
u16 tempword;
- u32 status;
+ int status;
tempx = (u32)handshake_value;
tempx = ntohl(tempx);
@@ -226,7 +226,7 @@ static u16 get_handshake_usb(struct ft1000_usb *ft1000dev, u16 expected_value)
u16 handshake;
int loopcnt;
u16 temp;
- u32 status = 0;
+ int status = 0;
loopcnt = 0;
handshake = 0;
@@ -278,7 +278,7 @@ static void put_handshake_usb(struct ft1000_usb *ft1000dev,u16 handshake_value)
static u16 get_request_type(struct ft1000_usb *ft1000dev)
{
u16 request_type;
- u32 status;
+ int status;
u16 tempword;
u32 tempx;
@@ -301,7 +301,7 @@ static u16 get_request_type(struct ft1000_usb *ft1000dev)
static u16 get_request_type_usb(struct ft1000_usb *ft1000dev)
{
u16 request_type;
- u32 status;
+ int status;
u16 tempword;
u32 tempx;
@@ -331,7 +331,7 @@ static long get_request_value(struct ft1000_usb *ft1000dev)
{
u32 value;
u16 tempword;
- u32 status;
+ int status;
if (ft1000dev->bootmode == 1) {
status = fix_ft1000_read_dpram32(ft1000dev,
@@ -355,7 +355,7 @@ static long get_request_value(struct ft1000_usb *ft1000dev)
static void put_request_value(struct ft1000_usb *ft1000dev, long lvalue)
{
u32 tempx;
- u32 status;
+ int status;
tempx = ntohl(lvalue);
status = fix_ft1000_write_dpram32(ft1000dev, DWNLD_MAG1_SIZE_LOC,
@@ -523,10 +523,10 @@ static void usb_dnld_complete (struct urb *urb)
* u8 **pUcFile - DSP image file pointer in u8
* long word_length - length of the buffer to be written to DPRAM
*/
-static u32 write_blk_fifo(struct ft1000_usb *ft1000dev, u16 **pUsFile,
+static int write_blk_fifo(struct ft1000_usb *ft1000dev, u16 **pUsFile,
u8 **pUcFile, long word_length)
{
- u32 Status = STATUS_SUCCESS;
+ int Status = STATUS_SUCCESS;
int byte_length;
byte_length = word_length * 4;
@@ -575,11 +575,11 @@ static int scram_start_dwnld(struct ft1000_usb *ft1000dev, u16 *hshake,
return status;
}
-static u16 request_code_segment(struct ft1000_usb *ft1000dev, u16 **s_file,
+static int request_code_segment(struct ft1000_usb *ft1000dev, u16 **s_file,
u8 **c_file, const u8 *endpoint, bool boot_case)
{
long word_length;
- u16 status;
+ int status;
/*DEBUG("FT1000:REQUEST_CODE_SEGMENT\n");i*/
word_length = get_request_value(ft1000dev);
@@ -613,10 +613,10 @@ static u16 request_code_segment(struct ft1000_usb *ft1000dev, u16 **s_file,
}
/* Scramble downloader for Harley based ASIC via USB interface */
-u16 scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
+int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
u32 FileLength)
{
- u16 status = STATUS_SUCCESS;
+ int status = STATUS_SUCCESS;
u32 state;
u16 handshake;
struct pseudo_hdr *pseudo_header;
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
index bd1da1f19cd2..e8d00a930dc6 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
@@ -125,7 +125,7 @@ extern size_t FileLength;
extern int numofmsgbuf;
int ft1000_close(struct net_device *dev);
-u16 scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
+int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
u32 FileLength);
extern struct list_head freercvpool;