linuxkpi: rename cdev to ldev

the variables hold pointers to a linux_cdev, not to a FreeBSD cdev.

Reviewed by:	hselasky
Sponsored by:	Mellanox Technologies/NVidia Networking
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2021-03-30 11:43:21 +03:00
parent 7b0125cbec
commit 28b482e2ba
2 changed files with 6 additions and 5 deletions

View file

@ -2220,12 +2220,12 @@ linux_cdev_release(struct kobject *kobj)
static void
linux_cdev_static_release(struct kobject *kobj)
{
struct linux_cdev *cdev;
struct linux_cdev *ldev;
struct kobject *parent;
cdev = container_of(kobj, struct linux_cdev, kobj);
ldev = container_of(kobj, struct linux_cdev, kobj);
parent = kobj->parent;
linux_destroy_dev(cdev);
linux_destroy_dev(ldev);
kobject_put(parent);
}

View file

@ -1520,8 +1520,9 @@ linux_file_close(struct file *file, struct thread *td)
if (filp->f_vnode != NULL)
vdrop(filp->f_vnode);
linux_drop_fop(ldev);
if (filp->f_cdev != NULL)
linux_cdev_deref(filp->f_cdev);
ldev = filp->f_cdev;
if (ldev != NULL)
linux_cdev_deref(ldev);
kfree(filp);
return (error);