Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d96940b authored by Marek Belisko's avatar Marek Belisko Committed by Greg Kroah-Hartman
Browse files

staging: ft1000: Fix private data pointer usage.



Assign private data pointer to device for usage in file operations.

Signed-off-by: default avatarMarek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9119dee1
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -347,12 +347,15 @@ void ft1000_DestroyDevice(struct net_device *dev)
static int ft1000_ChOpen (struct inode *Inode, struct file *File)
static int ft1000_ChOpen (struct inode *Inode, struct file *File)
{
{
	struct ft1000_info *info;
	struct ft1000_info *info;
	struct ft1000_device *dev = (struct ft1000_device *)Inode->i_private;
    int i,num;
    int i,num;


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


	info = File->private_data = netdev_priv(dev->net);

    for (i=0; i<5; i++)
    for (i=0; i<5; i++)
        DEBUG("pdevobj[%d]=%p\n", i, pdevobj[i]); //aelias [+] reason: down
        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].nTxMsgReject = 0;
    info->app_info[i].nRxMsgMiss = 0;
    info->app_info[i].nRxMsgMiss = 0;


    File->private_data = pdevobj[num]->net;

	nonseekable_open(Inode, File);
	nonseekable_open(Inode, File);
    return 0;
    return 0;
}
}