From: Marek Belisko <marek.belisko@open-nandra.com>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Marek Belisko <marek.belisko@open-nandra.com>
Subject: [PATCH 3/8] staging: ft1000: Remove unused pdevobj array.
Date: Thu, 9 Dec 2010 11:26:48 +0100 [thread overview]
Message-ID: <1291890413-15255-4-git-send-email-marek.belisko@open-nandra.com> (raw)
In-Reply-To: <1291890413-15255-1-git-send-email-marek.belisko@open-nandra.com>
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>
---
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 8b735e4..0871e43 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,
unsigned long Argument);
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
struct list_head freercvpool;
@@ -165,11 +161,6 @@ int ft1000_CreateDevice(struct ft1000_device *dev)
DEBUG("ft1000_CreateDevice: number of instance = %d\n", ft1000_flarion_cnt);
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)
{
DEBUG("ft1000_CreateDevice: \"%s\" already registered\n", info->DeviceName);
@@ -327,8 +318,6 @@ void ft1000_DestroyDevice(struct net_device *dev)
// devfs_unregister(ft1000Handle[info->CardNumber]);
info->DeviceCreated = FALSE;
-
- pdevobj[info->CardNumber] = NULL;
}
@@ -356,18 +345,6 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
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 );
// Check if maximum number of application exceeded
--
1.7.1
next prev parent reply other threads:[~2010-12-09 10:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 10:26 [PATCH 0/8] Use debugfs for debugging purposes Marek Belisko
2010-12-09 10:26 ` [PATCH 1/8] staging: ft1000: Convert char device to debugfs Marek Belisko
2010-12-09 10:43 ` Dan Carpenter
2010-12-10 17:35 ` Dave Jones
2010-12-10 18:04 ` Greg KH
2010-12-09 10:26 ` [PATCH 2/8] staging: ft1000: Fix private data pointer usage Marek Belisko
2010-12-09 10:26 ` Marek Belisko [this message]
2010-12-09 10:26 ` [PATCH 4/8] staging: ft1000: Remove unused variable Marek Belisko
2010-12-09 10:26 ` [PATCH 5/8] staging: ft1000: Fix camelcase functions and variables Marek Belisko
2010-12-09 10:26 ` [PATCH 6/8] staging: ft1000: Remove dead code Marek Belisko
2010-12-09 10:26 ` [PATCH 7/8] staging: ft1000: Remove unused headers Marek Belisko
2010-12-09 10:26 ` [PATCH 8/8] staging: ft1000: Fix debug messages Marek Belisko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291890413-15255-4-git-send-email-marek.belisko@open-nandra.com \
--to=marek.belisko@open-nandra.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®