Commit e34dc580 authored by Marek Belisko's avatar Marek Belisko Committed by Greg Kroah-Hartman

staging: ft1000: Remove unused pdevobj array.

We don't need to store pointer to device in some local
array because we always pass to debugfs correct device pointer.
So remove it.
Signed-off-by: default avatarMarek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6d96940b
...@@ -51,10 +51,6 @@ static long ft1000_ChIoctl(struct file *File, unsigned int Command, ...@@ -51,10 +51,6 @@ static long ft1000_ChIoctl(struct file *File, unsigned int Command,
unsigned long Argument); unsigned long Argument);
static int ft1000_ChRelease (struct inode *Inode, struct file *File); static int ft1000_ChRelease (struct inode *Inode, struct file *File);
// Global pointer to device object
static struct ft1000_device *pdevobj[MAX_NUM_CARDS + 2];
//static devfs_handle_t ft1000Handle[MAX_NUM_CARDS];
// List to free receive command buffer pool // List to free receive command buffer pool
struct list_head freercvpool; struct list_head freercvpool;
...@@ -165,11 +161,6 @@ int ft1000_CreateDevice(struct ft1000_device *dev) ...@@ -165,11 +161,6 @@ int ft1000_CreateDevice(struct ft1000_device *dev)
DEBUG("ft1000_CreateDevice: number of instance = %d\n", ft1000_flarion_cnt); DEBUG("ft1000_CreateDevice: number of instance = %d\n", ft1000_flarion_cnt);
DEBUG("DeviceCreated = %x\n", info->DeviceCreated); DEBUG("DeviceCreated = %x\n", info->DeviceCreated);
//save the device info to global array
pdevobj[info->CardNumber] = dev;
DEBUG("ft1000_CreateDevice: ******SAVED pdevobj[%d]=%p\n", info->CardNumber, pdevobj[info->CardNumber]); //aelias [+] reason:up
if (info->DeviceCreated) if (info->DeviceCreated)
{ {
DEBUG("ft1000_CreateDevice: \"%s\" already registered\n", info->DeviceName); DEBUG("ft1000_CreateDevice: \"%s\" already registered\n", info->DeviceName);
...@@ -327,8 +318,6 @@ void ft1000_DestroyDevice(struct net_device *dev) ...@@ -327,8 +318,6 @@ void ft1000_DestroyDevice(struct net_device *dev)
// devfs_unregister(ft1000Handle[info->CardNumber]); // devfs_unregister(ft1000Handle[info->CardNumber]);
info->DeviceCreated = FALSE; info->DeviceCreated = FALSE;
pdevobj[info->CardNumber] = NULL;
} }
...@@ -356,18 +345,6 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File) ...@@ -356,18 +345,6 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
info = File->private_data = netdev_priv(dev->net); info = File->private_data = netdev_priv(dev->net);
for (i=0; i<5; i++)
DEBUG("pdevobj[%d]=%p\n", i, pdevobj[i]); //aelias [+] reason: down
if ( pdevobj[num] != NULL )
//info = (struct ft1000_info *)(pdevobj[num]->net->priv);
info = netdev_priv(pdevobj[num]->net);
else
{
DEBUG("ft1000_ChOpen: can not find device object %d\n", num);
return -1;
}
DEBUG("f_owner = %p number of application = %d\n", (&File->f_owner), info->appcnt ); DEBUG("f_owner = %p number of application = %d\n", (&File->f_owner), info->appcnt );
// Check if maximum number of application exceeded // Check if maximum number of application exceeded
......
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