Commit dedbc933 authored by Ondrej Zary's avatar Ondrej Zary Committed by Greg Kroah-Hartman

staging: ft1000: rename struct ft1000_device to ft1000_usb

After unifying struct ft1000_info, struct ft1000_device is now wrong name.
Rename it to ft1000_usb to match its semantics.
Signed-off-by: default avatarOndrej Zary <linux@rainbow-software.org>
Reviewed-by: default avatarMarek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3aa2303a
...@@ -137,7 +137,7 @@ void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist) ...@@ -137,7 +137,7 @@ void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist)
// Notes: Only called by init_module(). // Notes: Only called by init_module().
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
int ft1000_create_dev(struct ft1000_device *dev) int ft1000_create_dev(struct ft1000_usb *dev)
{ {
int result; int result;
int i; int i;
...@@ -227,7 +227,7 @@ int ft1000_create_dev(struct ft1000_device *dev) ...@@ -227,7 +227,7 @@ int ft1000_create_dev(struct ft1000_device *dev)
void ft1000_destroy_dev(struct net_device *netdev) void ft1000_destroy_dev(struct net_device *netdev)
{ {
struct ft1000_info *info = netdev_priv(netdev); struct ft1000_info *info = netdev_priv(netdev);
struct ft1000_device *dev = info->priv; struct ft1000_usb *dev = info->priv;
int i; int i;
struct dpram_blk *pdpram_blk; struct dpram_blk *pdpram_blk;
struct dpram_blk *ptr; struct dpram_blk *ptr;
...@@ -292,7 +292,7 @@ void ft1000_destroy_dev(struct net_device *netdev) ...@@ -292,7 +292,7 @@ void ft1000_destroy_dev(struct net_device *netdev)
static int ft1000_open (struct inode *inode, struct file *file) static int ft1000_open (struct inode *inode, struct file *file)
{ {
struct ft1000_info *info; struct ft1000_info *info;
struct ft1000_device *dev = (struct ft1000_device *)inode->i_private; struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private;
int i,num; int i,num;
DEBUG("%s called\n", __func__); DEBUG("%s called\n", __func__);
...@@ -349,7 +349,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) ...@@ -349,7 +349,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait)
{ {
struct net_device *netdev = file->private_data; struct net_device *netdev = file->private_data;
struct ft1000_info *info = netdev_priv(netdev); struct ft1000_info *info = netdev_priv(netdev);
struct ft1000_device *dev = info->priv; struct ft1000_usb *dev = info->priv;
int i; int i;
//DEBUG("ft1000_poll_dev called\n"); //DEBUG("ft1000_poll_dev called\n");
...@@ -398,7 +398,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, ...@@ -398,7 +398,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
{ {
void __user *argp = (void __user *)argument; void __user *argp = (void __user *)argument;
struct ft1000_info *info; struct ft1000_info *info;
struct ft1000_device *ft1000dev; struct ft1000_usb *ft1000dev;
int result=0; int result=0;
int cmd; int cmd;
int i; int i;
...@@ -740,7 +740,7 @@ static int ft1000_release (struct inode *inode, struct file *file) ...@@ -740,7 +740,7 @@ static int ft1000_release (struct inode *inode, struct file *file)
{ {
struct ft1000_info *info; struct ft1000_info *info;
struct net_device *dev; struct net_device *dev;
struct ft1000_device *ft1000dev; struct ft1000_usb *ft1000dev;
int i; int i;
struct dpram_blk *pdpram_blk; struct dpram_blk *pdpram_blk;
......
...@@ -114,7 +114,7 @@ struct dsp_image_info { ...@@ -114,7 +114,7 @@ struct dsp_image_info {
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Function: check_usb_db // Function: check_usb_db
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_usb - device structure
// //
// Returns: 0 - success // Returns: 0 - success
// //
...@@ -123,7 +123,7 @@ struct dsp_image_info { ...@@ -123,7 +123,7 @@ struct dsp_image_info {
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static u32 check_usb_db (struct ft1000_device *ft1000dev) static u32 check_usb_db (struct ft1000_usb *ft1000dev)
{ {
int loopcnt; int loopcnt;
u16 temp; u16 temp;
...@@ -172,7 +172,7 @@ static u32 check_usb_db (struct ft1000_device *ft1000dev) ...@@ -172,7 +172,7 @@ static u32 check_usb_db (struct ft1000_device *ft1000dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Function: get_handshake // Function: get_handshake
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_usb - device structure
// u16 expected_value - the handshake value expected // u16 expected_value - the handshake value expected
// //
// Returns: handshakevalue - success // Returns: handshakevalue - success
...@@ -183,7 +183,7 @@ static u32 check_usb_db (struct ft1000_device *ft1000dev) ...@@ -183,7 +183,7 @@ static u32 check_usb_db (struct ft1000_device *ft1000dev)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static u16 get_handshake(struct ft1000_device *ft1000dev, u16 expected_value) static u16 get_handshake(struct ft1000_usb *ft1000dev, u16 expected_value)
{ {
u16 handshake; u16 handshake;
int loopcnt; int loopcnt;
...@@ -232,7 +232,7 @@ static u16 get_handshake(struct ft1000_device *ft1000dev, u16 expected_value) ...@@ -232,7 +232,7 @@ static u16 get_handshake(struct ft1000_device *ft1000dev, u16 expected_value)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Function: put_handshake // Function: put_handshake
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_usb - device structure
// u16 handshake_value - handshake to be written // u16 handshake_value - handshake to be written
// //
// Returns: none // Returns: none
...@@ -243,7 +243,7 @@ static u16 get_handshake(struct ft1000_device *ft1000dev, u16 expected_value) ...@@ -243,7 +243,7 @@ static u16 get_handshake(struct ft1000_device *ft1000dev, u16 expected_value)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void put_handshake(struct ft1000_device *ft1000dev,u16 handshake_value) static void put_handshake(struct ft1000_usb *ft1000dev,u16 handshake_value)
{ {
u32 tempx; u32 tempx;
u16 tempword; u16 tempword;
...@@ -262,7 +262,7 @@ static void put_handshake(struct ft1000_device *ft1000dev,u16 handshake_value) ...@@ -262,7 +262,7 @@ static void put_handshake(struct ft1000_device *ft1000dev,u16 handshake_value)
FT1000_REG_DOORBELL); FT1000_REG_DOORBELL);
} }
static u16 get_handshake_usb(struct ft1000_device *ft1000dev, u16 expected_value) static u16 get_handshake_usb(struct ft1000_usb *ft1000dev, u16 expected_value)
{ {
u16 handshake; u16 handshake;
int loopcnt; int loopcnt;
...@@ -309,7 +309,7 @@ static u16 get_handshake_usb(struct ft1000_device *ft1000dev, u16 expected_value ...@@ -309,7 +309,7 @@ static u16 get_handshake_usb(struct ft1000_device *ft1000dev, u16 expected_value
return HANDSHAKE_TIMEOUT_VALUE; return HANDSHAKE_TIMEOUT_VALUE;
} }
static void put_handshake_usb(struct ft1000_device *ft1000dev,u16 handshake_value) static void put_handshake_usb(struct ft1000_usb *ft1000dev,u16 handshake_value)
{ {
int i; int i;
...@@ -319,7 +319,7 @@ static void put_handshake_usb(struct ft1000_device *ft1000dev,u16 handshake_valu ...@@ -319,7 +319,7 @@ static void put_handshake_usb(struct ft1000_device *ft1000dev,u16 handshake_valu
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Function: get_request_type // Function: get_request_type
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_usb - device structure
// //
// Returns: request type - success // Returns: request type - success
// //
...@@ -328,7 +328,7 @@ static void put_handshake_usb(struct ft1000_device *ft1000dev,u16 handshake_valu ...@@ -328,7 +328,7 @@ static void put_handshake_usb(struct ft1000_device *ft1000dev,u16 handshake_valu
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static u16 get_request_type(struct ft1000_device *ft1000dev) static u16 get_request_type(struct ft1000_usb *ft1000dev)
{ {
u16 request_type; u16 request_type;
u32 status; u32 status;
...@@ -351,7 +351,7 @@ static u16 get_request_type(struct ft1000_device *ft1000dev) ...@@ -351,7 +351,7 @@ static u16 get_request_type(struct ft1000_device *ft1000dev)
return request_type; return request_type;
} }
static u16 get_request_type_usb(struct ft1000_device *ft1000dev) static u16 get_request_type_usb(struct ft1000_usb *ft1000dev)
{ {
u16 request_type; u16 request_type;
u32 status; u32 status;
...@@ -383,7 +383,7 @@ static u16 get_request_type_usb(struct ft1000_device *ft1000dev) ...@@ -383,7 +383,7 @@ static u16 get_request_type_usb(struct ft1000_device *ft1000dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Function: get_request_value // Function: get_request_value
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_usb - device structure
// //
// Returns: request value - success // Returns: request value - success
// //
...@@ -392,7 +392,7 @@ static u16 get_request_type_usb(struct ft1000_device *ft1000dev) ...@@ -392,7 +392,7 @@ static u16 get_request_type_usb(struct ft1000_device *ft1000dev)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static long get_request_value(struct ft1000_device *ft1000dev) static long get_request_value(struct ft1000_usb *ft1000dev)
{ {
u32 value; u32 value;
u16 tempword; u16 tempword;
...@@ -419,7 +419,7 @@ static long get_request_value(struct ft1000_device *ft1000dev) ...@@ -419,7 +419,7 @@ static long get_request_value(struct ft1000_device *ft1000dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Function: put_request_value // Function: put_request_value
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_usb - device structure
// long lvalue - value to be put into DPRAM location DWNLD_MAG1_SIZE_LOC // long lvalue - value to be put into DPRAM location DWNLD_MAG1_SIZE_LOC
// //
// Returns: none // Returns: none
...@@ -429,7 +429,7 @@ static long get_request_value(struct ft1000_device *ft1000dev) ...@@ -429,7 +429,7 @@ static long get_request_value(struct ft1000_device *ft1000dev)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void put_request_value(struct ft1000_device *ft1000dev, long lvalue) static void put_request_value(struct ft1000_usb *ft1000dev, long lvalue)
{ {
u32 tempx; u32 tempx;
u32 status; u32 status;
...@@ -480,7 +480,7 @@ static int check_buffers(u16 *buff_w, u16 *buff_r, int len, int offset) ...@@ -480,7 +480,7 @@ static int check_buffers(u16 *buff_w, u16 *buff_r, int len, int offset)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Function: write_blk // Function: write_blk
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_usb - device structure
// u16 **pUsFile - DSP image file pointer in u16 // u16 **pUsFile - DSP image file pointer in u16
// u8 **pUcFile - DSP image file pointer in u8 // u8 **pUcFile - DSP image file pointer in u8
// long word_length - length of the buffer to be written // long word_length - length of the buffer to be written
...@@ -494,7 +494,7 @@ static int check_buffers(u16 *buff_w, u16 *buff_r, int len, int offset) ...@@ -494,7 +494,7 @@ static int check_buffers(u16 *buff_w, u16 *buff_r, int len, int offset)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static u32 write_blk (struct ft1000_device *ft1000dev, u16 **pUsFile, u8 **pUcFile, long word_length) static u32 write_blk (struct ft1000_usb *ft1000dev, u16 **pUsFile, u8 **pUcFile, long word_length)
{ {
u32 Status = STATUS_SUCCESS; u32 Status = STATUS_SUCCESS;
u16 dpram; u16 dpram;
...@@ -619,7 +619,7 @@ static void usb_dnld_complete (struct urb *urb) ...@@ -619,7 +619,7 @@ static void usb_dnld_complete (struct urb *urb)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Function: write_blk_fifo // Function: write_blk_fifo
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_usb - device structure
// u16 **pUsFile - DSP image file pointer in u16 // u16 **pUsFile - DSP image file pointer in u16
// u8 **pUcFile - DSP image file pointer in u8 // u8 **pUcFile - DSP image file pointer in u8
// long word_length - length of the buffer to be written // long word_length - length of the buffer to be written
...@@ -633,7 +633,7 @@ static void usb_dnld_complete (struct urb *urb) ...@@ -633,7 +633,7 @@ static void usb_dnld_complete (struct urb *urb)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static u32 write_blk_fifo(struct ft1000_device *ft1000dev, u16 **pUsFile, static u32 write_blk_fifo(struct ft1000_usb *ft1000dev, u16 **pUsFile,
u8 **pUcFile, long word_length) u8 **pUcFile, long word_length)
{ {
u32 Status = STATUS_SUCCESS; u32 Status = STATUS_SUCCESS;
...@@ -676,7 +676,7 @@ static u32 write_blk_fifo(struct ft1000_device *ft1000dev, u16 **pUsFile, ...@@ -676,7 +676,7 @@ static u32 write_blk_fifo(struct ft1000_device *ft1000dev, u16 **pUsFile,
// Returns: status - return code // Returns: status - return code
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, u16 scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
u32 FileLength) u32 FileLength)
{ {
u16 status = STATUS_SUCCESS; u16 status = STATUS_SUCCESS;
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
#define FTNET_PROC init_net.proc_net #define FTNET_PROC init_net.proc_net
int ft1000_read_dpram16 (struct ft1000_device *ft1000dev, u16 indx, int ft1000_read_dpram16 (struct ft1000_usb *ft1000dev, u16 indx,
u8 *buffer, u8 highlow); u8 *buffer, u8 highlow);
......
...@@ -63,11 +63,11 @@ static int ft1000_probe(struct usb_interface *interface, ...@@ -63,11 +63,11 @@ static int ft1000_probe(struct usb_interface *interface,
unsigned numaltsetting; unsigned numaltsetting;
int i, ret = 0, size; int i, ret = 0, size;
struct ft1000_device *ft1000dev; struct ft1000_usb *ft1000dev;
struct ft1000_info *pft1000info = NULL; struct ft1000_info *pft1000info = NULL;
const struct firmware *dsp_fw; const struct firmware *dsp_fw;
ft1000dev = kzalloc(sizeof(struct ft1000_device), GFP_KERNEL); ft1000dev = kzalloc(sizeof(struct ft1000_usb), GFP_KERNEL);
if (!ft1000dev) { if (!ft1000dev) {
pr_err("out of memory allocating device structure\n"); pr_err("out of memory allocating device structure\n");
...@@ -219,7 +219,7 @@ static int ft1000_probe(struct usb_interface *interface, ...@@ -219,7 +219,7 @@ static int ft1000_probe(struct usb_interface *interface,
static void ft1000_disconnect(struct usb_interface *interface) static void ft1000_disconnect(struct usb_interface *interface)
{ {
struct ft1000_info *pft1000info; struct ft1000_info *pft1000info;
struct ft1000_device *ft1000dev; struct ft1000_usb *ft1000dev;
DEBUG("ft1000_disconnect is called\n"); DEBUG("ft1000_disconnect is called\n");
......
...@@ -62,7 +62,7 @@ struct ft1000_debug_dirs { ...@@ -62,7 +62,7 @@ struct ft1000_debug_dirs {
int int_number; int int_number;
}; };
struct ft1000_device { struct ft1000_usb {
struct usb_device *dev; struct usb_device *dev;
struct net_device *net; struct net_device *net;
...@@ -103,21 +103,21 @@ struct dpram_blk { ...@@ -103,21 +103,21 @@ struct dpram_blk {
u16 *pbuffer; u16 *pbuffer;
} __packed; } __packed;
int ft1000_read_register(struct ft1000_device *ft1000dev, int ft1000_read_register(struct ft1000_usb *ft1000dev,
u16 *Data, u16 nRegIndx); u16 *Data, u16 nRegIndx);
int ft1000_write_register(struct ft1000_device *ft1000dev, int ft1000_write_register(struct ft1000_usb *ft1000dev,
u16 value, u16 nRegIndx); u16 value, u16 nRegIndx);
int ft1000_read_dpram32(struct ft1000_device *ft1000dev, int ft1000_read_dpram32(struct ft1000_usb *ft1000dev,
u16 indx, u8 *buffer, u16 cnt); u16 indx, u8 *buffer, u16 cnt);
int ft1000_write_dpram32(struct ft1000_device *ft1000dev, int ft1000_write_dpram32(struct ft1000_usb *ft1000dev,
u16 indx, u8 *buffer, u16 cnt); u16 indx, u8 *buffer, u16 cnt);
int ft1000_read_dpram16(struct ft1000_device *ft1000dev, int ft1000_read_dpram16(struct ft1000_usb *ft1000dev,
u16 indx, u8 *buffer, u8 highlow); u16 indx, u8 *buffer, u8 highlow);
int ft1000_write_dpram16(struct ft1000_device *ft1000dev, int ft1000_write_dpram16(struct ft1000_usb *ft1000dev,
u16 indx, u16 value, u8 highlow); u16 indx, u16 value, u8 highlow);
int fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, int fix_ft1000_read_dpram32(struct ft1000_usb *ft1000dev,
u16 indx, u8 *buffer); u16 indx, u8 *buffer);
int fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, int fix_ft1000_write_dpram32(struct ft1000_usb *ft1000dev,
u16 indx, u8 *buffer); u16 indx, u8 *buffer);
extern void *pFileStart; extern void *pFileStart;
...@@ -125,25 +125,25 @@ extern size_t FileLength; ...@@ -125,25 +125,25 @@ extern size_t FileLength;
extern int numofmsgbuf; extern int numofmsgbuf;
int ft1000_close(struct net_device *dev); int ft1000_close(struct net_device *dev);
u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, u16 scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
u32 FileLength); u32 FileLength);
extern struct list_head freercvpool; extern struct list_head freercvpool;
extern spinlock_t free_buff_lock; /* lock to arbitrate free buffer list for receive command data */ extern spinlock_t free_buff_lock; /* lock to arbitrate free buffer list for receive command data */
int ft1000_create_dev(struct ft1000_device *dev); int ft1000_create_dev(struct ft1000_usb *dev);
void ft1000_destroy_dev(struct net_device *dev); void ft1000_destroy_dev(struct net_device *dev);
extern void card_send_command(struct ft1000_device *ft1000dev, extern void card_send_command(struct ft1000_usb *ft1000dev,
void *ptempbuffer, int size); void *ptempbuffer, int size);
struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist); struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist);
void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist); void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist);
int dsp_reload(struct ft1000_device *ft1000dev); int dsp_reload(struct ft1000_usb *ft1000dev);
int init_ft1000_netdev(struct ft1000_device *ft1000dev); int init_ft1000_netdev(struct ft1000_usb *ft1000dev);
struct usb_interface; struct usb_interface;
int reg_ft1000_netdev(struct ft1000_device *ft1000dev, int reg_ft1000_netdev(struct ft1000_usb *ft1000dev,
struct usb_interface *intf); struct usb_interface *intf);
int ft1000_poll(void *dev_id); int ft1000_poll(void *dev_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment