diff options
author | Marek Belisko <marek.belisko@open-nandra.com> | 2010-12-09 05:26:48 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-12-09 19:34:31 -0500 |
commit | e34dc580dc4a76106755b88ada5903eaa427c9f4 (patch) | |
tree | 646dda7089f7d3aa873e3e21ba1829d291e3568c | |
parent | 6d96940b2de8f8ac2bc938ea9249ed380cf906e0 (diff) |
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: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c index 8b735e489878..0871e43159c6 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | |||
@@ -51,10 +51,6 @@ static long ft1000_ChIoctl(struct file *File, unsigned int Command, | |||
51 | unsigned long Argument); | 51 | unsigned long Argument); |
52 | static int ft1000_ChRelease (struct inode *Inode, struct file *File); | 52 | static int ft1000_ChRelease (struct inode *Inode, struct file *File); |
53 | 53 | ||
54 | // Global pointer to device object | ||
55 | static struct ft1000_device *pdevobj[MAX_NUM_CARDS + 2]; | ||
56 | //static devfs_handle_t ft1000Handle[MAX_NUM_CARDS]; | ||
57 | |||
58 | // List to free receive command buffer pool | 54 | // List to free receive command buffer pool |
59 | struct list_head freercvpool; | 55 | struct list_head freercvpool; |
60 | 56 | ||
@@ -165,11 +161,6 @@ int ft1000_CreateDevice(struct ft1000_device *dev) | |||
165 | DEBUG("ft1000_CreateDevice: number of instance = %d\n", ft1000_flarion_cnt); | 161 | DEBUG("ft1000_CreateDevice: number of instance = %d\n", ft1000_flarion_cnt); |
166 | DEBUG("DeviceCreated = %x\n", info->DeviceCreated); | 162 | DEBUG("DeviceCreated = %x\n", info->DeviceCreated); |
167 | 163 | ||
168 | //save the device info to global array | ||
169 | pdevobj[info->CardNumber] = dev; | ||
170 | |||
171 | DEBUG("ft1000_CreateDevice: ******SAVED pdevobj[%d]=%p\n", info->CardNumber, pdevobj[info->CardNumber]); //aelias [+] reason:up | ||
172 | |||
173 | if (info->DeviceCreated) | 164 | if (info->DeviceCreated) |
174 | { | 165 | { |
175 | DEBUG("ft1000_CreateDevice: \"%s\" already registered\n", info->DeviceName); | 166 | DEBUG("ft1000_CreateDevice: \"%s\" already registered\n", info->DeviceName); |
@@ -327,8 +318,6 @@ void ft1000_DestroyDevice(struct net_device *dev) | |||
327 | // devfs_unregister(ft1000Handle[info->CardNumber]); | 318 | // devfs_unregister(ft1000Handle[info->CardNumber]); |
328 | 319 | ||
329 | info->DeviceCreated = FALSE; | 320 | info->DeviceCreated = FALSE; |
330 | |||
331 | pdevobj[info->CardNumber] = NULL; | ||
332 | } | 321 | } |
333 | 322 | ||
334 | 323 | ||
@@ -356,18 +345,6 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File) | |||
356 | 345 | ||
357 | info = File->private_data = netdev_priv(dev->net); | 346 | info = File->private_data = netdev_priv(dev->net); |
358 | 347 | ||
359 | for (i=0; i<5; i++) | ||
360 | DEBUG("pdevobj[%d]=%p\n", i, pdevobj[i]); //aelias [+] reason: down | ||
361 | |||
362 | if ( pdevobj[num] != NULL ) | ||
363 | //info = (struct ft1000_info *)(pdevobj[num]->net->priv); | ||
364 | info = netdev_priv(pdevobj[num]->net); | ||
365 | else | ||
366 | { | ||
367 | DEBUG("ft1000_ChOpen: can not find device object %d\n", num); | ||
368 | return -1; | ||
369 | } | ||
370 | |||
371 | DEBUG("f_owner = %p number of application = %d\n", (&File->f_owner), info->appcnt ); | 348 | DEBUG("f_owner = %p number of application = %d\n", (&File->f_owner), info->appcnt ); |
372 | 349 | ||
373 | // Check if maximum number of application exceeded | 350 | // Check if maximum number of application exceeded |