diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2021-03-30 08:43:21 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2021-04-06 00:38:28 +0000 |
commit | 28b482e2baf43cdd30e8b9bd090e6d9f405cf4b3 (patch) | |
tree | 3c3e220ce3f5a7005050cbd770c307df63e324ce /sys | |
parent | 7b0125cbec1579a0a1bf38f7abe583b5f6fd79e7 (diff) | |
download | src-28b482e2baf43cdd30e8b9bd090e6d9f405cf4b3.tar.gz src-28b482e2baf43cdd30e8b9bd090e6d9f405cf4b3.zip |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_compat.c | 6 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_compat.c.orig | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index b7a7ba8b4f18..0731859e7a53 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -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); } diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c.orig b/sys/compat/linuxkpi/common/src/linux_compat.c.orig index 42f47b6e510a..b7a7ba8b4f18 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c.orig +++ b/sys/compat/linuxkpi/common/src/linux_compat.c.orig @@ -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); |