From: Marek Belisko Date: Thu, 9 Dec 2010 10:26:47 +0000 (+0100) Subject: staging: ft1000: Fix private data pointer usage. X-Git-Tag: MMI-PSA29.97-13-9~21393^2~70 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d96940b2de8f8ac2bc938ea9249ed380cf906e0;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git staging: ft1000: Fix private data pointer usage. Assign private data pointer to device for usage in file operations. Signed-off-by: Marek Belisko Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c index 1238b7759e5b..8b735e489878 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; }