staging: ft1000: Get rid of using typedef.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Marek Belisko 2010-10-16 22:37:25 +02:00 committed by Greg Kroah-Hartman
parent a1277d85dc
commit 29437ab09f
3 changed files with 21 additions and 21 deletions

View File

@ -172,10 +172,10 @@ static int rm_mknod (void *pdata)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
PDPRAM_BLK ft1000_get_buffer (struct list_head *bufflist) struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist)
{ {
unsigned long flags; unsigned long flags;
PDPRAM_BLK ptr; struct dpram_blk *ptr;
spin_lock_irqsave(&free_buff_lock, flags); spin_lock_irqsave(&free_buff_lock, flags);
// Check if buffer is available // Check if buffer is available
@ -185,7 +185,7 @@ PDPRAM_BLK ft1000_get_buffer (struct list_head *bufflist)
} }
else { else {
numofmsgbuf--; numofmsgbuf--;
ptr = list_entry(bufflist->next, DPRAM_BLK, list); ptr = list_entry(bufflist->next, struct dpram_blk, list);
list_del(&ptr->list); list_del(&ptr->list);
//DEBUG("ft1000_get_buffer: number of free msg buffers = %d\n", numofmsgbuf); //DEBUG("ft1000_get_buffer: number of free msg buffers = %d\n", numofmsgbuf);
} }
@ -209,7 +209,7 @@ PDPRAM_BLK ft1000_get_buffer (struct list_head *bufflist)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void ft1000_free_buffer (PDPRAM_BLK pdpram_blk, struct list_head *plist) void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist)
{ {
unsigned long flags; unsigned long flags;
@ -299,7 +299,7 @@ int ft1000_CreateDevice(struct ft1000_device *dev)
// // create list of free buffers // // create list of free buffers
// for (i=0; i<NUM_OF_FREE_BUFFERS; i++) { // for (i=0; i<NUM_OF_FREE_BUFFERS; i++) {
// // Get memory for DPRAM_DATA link list // // Get memory for DPRAM_DATA link list
// pdpram_blk = kmalloc ( sizeof(DPRAM_BLK), GFP_KERNEL ); // pdpram_blk = kmalloc ( sizeof(struct dpram_blk), GFP_KERNEL );
// // Get a block of memory to store command data // // Get a block of memory to store command data
// pdpram_blk->pbuffer = kmalloc ( MAX_CMD_SQSIZE, GFP_KERNEL ); // pdpram_blk->pbuffer = kmalloc ( MAX_CMD_SQSIZE, GFP_KERNEL );
// // link provisioning data // // link provisioning data
@ -353,8 +353,8 @@ void ft1000_DestroyDevice(struct net_device *dev)
int result = 0; int result = 0;
pid_t pid; pid_t pid;
int i; int i;
PDPRAM_BLK pdpram_blk; struct dpram_blk *pdpram_blk;
DPRAM_BLK *ptr; struct dpram_blk *ptr;
DEBUG("ft1000_chdev:ft1000_DestroyDevice called\n"); DEBUG("ft1000_chdev:ft1000_DestroyDevice called\n");
@ -372,7 +372,7 @@ void ft1000_DestroyDevice(struct net_device *dev)
// Make sure we free any memory reserve for slow Queue // Make sure we free any memory reserve for slow Queue
for (i=0; i<MAX_NUM_APP; i++) { for (i=0; i<MAX_NUM_APP; i++) {
while (list_empty(&info->app_info[i].app_sqlist) == 0) { while (list_empty(&info->app_info[i].app_sqlist) == 0) {
pdpram_blk = list_entry(info->app_info[i].app_sqlist.next, DPRAM_BLK, list); pdpram_blk = list_entry(info->app_info[i].app_sqlist.next, struct dpram_blk, list);
list_del(&pdpram_blk->list); list_del(&pdpram_blk->list);
ft1000_free_buffer(pdpram_blk, &freercvpool); ft1000_free_buffer(pdpram_blk, &freercvpool);
@ -383,7 +383,7 @@ void ft1000_DestroyDevice(struct net_device *dev)
// Remove buffer allocated for receive command data // Remove buffer allocated for receive command data
if (ft1000_flarion_cnt == 0) { if (ft1000_flarion_cnt == 0) {
while (list_empty(&freercvpool) == 0) { while (list_empty(&freercvpool) == 0) {
ptr = list_entry(freercvpool.next, DPRAM_BLK, list); ptr = list_entry(freercvpool.next, struct dpram_blk, list);
list_del(&ptr->list); list_del(&ptr->list);
kfree(ptr->pbuffer); kfree(ptr->pbuffer);
kfree(ptr); kfree(ptr);
@ -817,7 +817,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
break; break;
case IOCTL_GET_DPRAM_CMD: case IOCTL_GET_DPRAM_CMD:
{ {
PDPRAM_BLK pdpram_blk; struct dpram_blk *pdpram_blk;
IOCTL_DPRAM_BLK __user *pioctl_dpram; IOCTL_DPRAM_BLK __user *pioctl_dpram;
int msglen; int msglen;
@ -847,7 +847,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
if (list_empty(&info->app_info[i].app_sqlist) == 0) { if (list_empty(&info->app_info[i].app_sqlist) == 0) {
//DEBUG("FT1000:ft1000_ChIoctl:Message detected in slow queue\n"); //DEBUG("FT1000:ft1000_ChIoctl:Message detected in slow queue\n");
spin_lock_irqsave(&free_buff_lock, flags); spin_lock_irqsave(&free_buff_lock, flags);
pdpram_blk = list_entry(info->app_info[i].app_sqlist.next, DPRAM_BLK, list); pdpram_blk = list_entry(info->app_info[i].app_sqlist.next, struct dpram_blk, list);
list_del(&pdpram_blk->list); list_del(&pdpram_blk->list);
info->app_info[i].NumOfMsg--; info->app_info[i].NumOfMsg--;
//DEBUG("FT1000:ft1000_ChIoctl:NumOfMsg for app %d = %d\n", i, info->app_info[i].NumOfMsg); //DEBUG("FT1000:ft1000_ChIoctl:NumOfMsg for app %d = %d\n", i, info->app_info[i].NumOfMsg);
@ -896,7 +896,7 @@ static int ft1000_ChRelease (struct inode *Inode, struct file *File)
PFT1000_INFO info; PFT1000_INFO info;
struct net_device *dev; struct net_device *dev;
int i; int i;
PDPRAM_BLK pdpram_blk; struct dpram_blk *pdpram_blk;
DEBUG("ft1000_ChRelease called\n"); DEBUG("ft1000_ChRelease called\n");
@ -921,7 +921,7 @@ static int ft1000_ChRelease (struct inode *Inode, struct file *File)
while (list_empty(&info->app_info[i].app_sqlist) == 0) { while (list_empty(&info->app_info[i].app_sqlist) == 0) {
DEBUG("Remove and free memory queue up on slow queue\n"); DEBUG("Remove and free memory queue up on slow queue\n");
pdpram_blk = list_entry(info->app_info[i].app_sqlist.next, DPRAM_BLK, list); pdpram_blk = list_entry(info->app_info[i].app_sqlist.next, struct dpram_blk, list);
list_del(&pdpram_blk->list); list_del(&pdpram_blk->list);
ft1000_free_buffer(pdpram_blk, &freercvpool); ft1000_free_buffer(pdpram_blk, &freercvpool);
} }

View File

@ -938,7 +938,7 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
{ {
struct net_device *netdev; struct net_device *netdev;
FT1000_INFO *pInfo = NULL; FT1000_INFO *pInfo = NULL;
PDPRAM_BLK pdpram_blk; struct dpram_blk *pdpram_blk;
int i, ret_val; int i, ret_val;
struct list_head *cur, *tmp; struct list_head *cur, *tmp;
char card_nr[2]; char card_nr[2];
@ -1054,7 +1054,7 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
// create list of free buffers // create list of free buffers
for (i=0; i<NUM_OF_FREE_BUFFERS; i++) { for (i=0; i<NUM_OF_FREE_BUFFERS; i++) {
// Get memory for DPRAM_DATA link list // Get memory for DPRAM_DATA link list
pdpram_blk = kmalloc ( sizeof(DPRAM_BLK), GFP_KERNEL ); pdpram_blk = kmalloc(sizeof(struct dpram_blk), GFP_KERNEL);
if (pdpram_blk == NULL) { if (pdpram_blk == NULL) {
ret_val = -ENOMEM; ret_val = -ENOMEM;
goto err_free; goto err_free;
@ -1077,7 +1077,7 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
err_free: err_free:
list_for_each_safe(cur, tmp, &freercvpool) { list_for_each_safe(cur, tmp, &freercvpool) {
pdpram_blk = list_entry(cur, DPRAM_BLK, list); pdpram_blk = list_entry(cur, struct dpram_blk, list);
list_del(&pdpram_blk->list); list_del(&pdpram_blk->list);
kfree(pdpram_blk->pbuffer); kfree(pdpram_blk->pbuffer);
kfree(pdpram_blk); kfree(pdpram_blk);
@ -2380,7 +2380,7 @@ int ft1000_poll(void* dev_id) {
USHORT modulo; USHORT modulo;
USHORT portid; USHORT portid;
u16 nxtph; u16 nxtph;
PDPRAM_BLK pdpram_blk; struct dpram_blk *pdpram_blk;
struct pseudo_hdr *ppseudo_hdr; struct pseudo_hdr *ppseudo_hdr;
unsigned long flags; unsigned long flags;

View File

@ -561,10 +561,10 @@ typedef struct _FT1000_INFO {
} FT1000_INFO, *PFT1000_INFO; } FT1000_INFO, *PFT1000_INFO;
typedef struct _DPRAM_BLK { struct dpram_blk {
struct list_head list; struct list_head list;
u16 *pbuffer; u16 *pbuffer;
} __attribute__ ((packed)) DPRAM_BLK, *PDPRAM_BLK; } __attribute__ ((packed));
u16 ft1000_read_register(struct ft1000_device *ft1000dev, u16* Data, u16 nRegIndx); u16 ft1000_read_register(struct ft1000_device *ft1000dev, u16* Data, u16 nRegIndx);
u16 ft1000_write_register(struct ft1000_device *ft1000dev, USHORT value, u16 nRegIndx); u16 ft1000_write_register(struct ft1000_device *ft1000dev, USHORT value, u16 nRegIndx);
@ -589,8 +589,8 @@ int ft1000_CreateDevice(struct ft1000_device *dev);
void ft1000_DestroyDevice(struct net_device *dev); void ft1000_DestroyDevice(struct net_device *dev);
extern void CardSendCommand(struct ft1000_device *ft1000dev, void *ptempbuffer, int size); extern void CardSendCommand(struct ft1000_device *ft1000dev, void *ptempbuffer, int size);
PDPRAM_BLK ft1000_get_buffer (struct list_head *bufflist); struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist);
void ft1000_free_buffer (PDPRAM_BLK pdpram_blk, struct list_head *plist); void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist);
char *getfw (char *fn, size_t *pimgsz); char *getfw (char *fn, size_t *pimgsz);