lkml.org 
[lkml]   [2010]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/8] staging: ft1000: Fix private data pointer usage.
Date
Assign private data pointer to device for usage in file operations.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 5 +++--
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 1238b77..8b735e4 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)
static int ft1000_ChOpen (struct inode *Inode, struct file *File)
{
struct ft1000_info *info;
+ struct ft1000_device *dev = (struct ft1000_device *)Inode->i_private;
int i,num;

DEBUG("ft1000_ChOpen called\n");
num = (MINOR(Inode->i_rdev) & 0xf);
DEBUG("ft1000_ChOpen: minor number=%d\n", num);

+ 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

@@ -393,8 +396,6 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
info->app_info[i].nTxMsgReject = 0;
info->app_info[i].nRxMsgMiss = 0;

- File->private_data = pdevobj[num]->net;
-
nonseekable_open(Inode, File);
return 0;
}
--
1.7.1


\
 
 \ /
  Last update: 2010-12-09 11:27    [W:0.082 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site