aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorMarek Belisko <marek.belisko@open-nandra.com>2010-12-09 05:26:47 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-09 19:34:31 -0500
commit6d96940b2de8f8ac2bc938ea9249ed380cf906e0 (patch)
tree1de8133641c0e01478ba0df1f874eb5b5062b713 /drivers/staging
parent9119dee1ce32453dfe24656091d69f8d57397fe0 (diff)
staging: ft1000: Fix private data pointer usage.
Assign private data pointer to device for usage in file operations. Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
index 1238b7759e5..8b735e48987 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
@@ -347,12 +347,15 @@ void ft1000_DestroyDevice(struct net_device *dev)
347static int ft1000_ChOpen (struct inode *Inode, struct file *File) 347static int ft1000_ChOpen (struct inode *Inode, struct file *File)
348{ 348{
349 struct ft1000_info *info; 349 struct ft1000_info *info;
350 struct ft1000_device *dev = (struct ft1000_device *)Inode->i_private;
350 int i,num; 351 int i,num;
351 352
352 DEBUG("ft1000_ChOpen called\n"); 353 DEBUG("ft1000_ChOpen called\n");
353 num = (MINOR(Inode->i_rdev) & 0xf); 354 num = (MINOR(Inode->i_rdev) & 0xf);
354 DEBUG("ft1000_ChOpen: minor number=%d\n", num); 355 DEBUG("ft1000_ChOpen: minor number=%d\n", num);
355 356
357 info = File->private_data = netdev_priv(dev->net);
358
356 for (i=0; i<5; i++) 359 for (i=0; i<5; i++)
357 DEBUG("pdevobj[%d]=%p\n", i, pdevobj[i]); //aelias [+] reason: down 360 DEBUG("pdevobj[%d]=%p\n", i, pdevobj[i]); //aelias [+] reason: down
358 361
@@ -393,8 +396,6 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
393 info->app_info[i].nTxMsgReject = 0; 396 info->app_info[i].nTxMsgReject = 0;
394 info->app_info[i].nRxMsgMiss = 0; 397 info->app_info[i].nRxMsgMiss = 0;
395 398
396 File->private_data = pdevobj[num]->net;
397
398 nonseekable_open(Inode, File); 399 nonseekable_open(Inode, File);
399 return 0; 400 return 0;
400} 401}