if (ft1000dev == NULL )
{
DEBUG("NULL ft1000dev, failure\n");
- return STATUS_FAILURE;
+ return -ENODEV;
}
else if ( ft1000dev->dev == NULL )
{
DEBUG("NULL ft1000dev->dev, failure\n");
- return STATUS_FAILURE;
+ return -ENODEV;
}
ret = usb_control_msg(ft1000dev->dev,
size,
LARGE_TIMEOUT);
- if (ret>0)
- ret = STATUS_SUCCESS;
- else
- ret = STATUS_FAILURE;
-
+ if (ret > 0)
+ ret = 0;
return ret;
//DEBUG("ft1000_read_register: ret is %d \n", ret);
//DEBUG("ft1000_read_register: data is %x \n", *Data);
- if ( ret != STATUS_SUCCESS )
- return STATUS_FAILURE;
return ret;
0,
LARGE_TIMEOUT );
- if ( ret != STATUS_SUCCESS )
- return STATUS_FAILURE;
-
return ret;
}
//DEBUG("ft1000_read_dpram32: ret is %d \n", ret);
//DEBUG("ft1000_read_dpram32: ret=%d \n", ret);
- if ( ret != STATUS_SUCCESS )
- return STATUS_FAILURE;
return ret;
cnt, //buffer size
LARGE_TIMEOUT );
-
- if ( ret != STATUS_SUCCESS )
- return STATUS_FAILURE;
-
-
return ret;
}
//DEBUG("ft1000_read_dpram16: data is %x \n", *buffer);
- if ( ret != STATUS_SUCCESS )
- return STATUS_FAILURE;
return ret;
0, //buffer size
LARGE_TIMEOUT );
-
- if ( ret != STATUS_SUCCESS )
- return STATUS_FAILURE;
-
-
return ret;
}