Date: Thu, 25 Apr 2019 21:54:32 +0000 (UTC) From: Johannes Lundberg <johalun@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346712 - head/sys/compat/linuxkpi/common/src Message-ID: <201904252154.x3PLsW6K097376@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: johalun Date: Thu Apr 25 21:54:32 2019 New Revision: 346712 URL: https://svnweb.freebsd.org/changeset/base/346712 Log: Don't call cdev_init where cdev_alloc is called. cdev_alloc already handles initialization. Reported by: johalun Reviewed by: hps Approved by: imp (mentor), hps MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19565 Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Apr 25 21:42:02 2019 (r346711) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Apr 25 21:54:32 2019 (r346712) @@ -2328,7 +2328,7 @@ __register_chrdev(unsigned int major, unsigned int bas for (i = baseminor; i < baseminor + count; i++) { cdev = cdev_alloc(); - cdev_init(cdev, fops); + cdev->ops = fops; kobject_set_name(&cdev->kobj, name); ret = cdev_add(cdev, makedev(major, i), 1); @@ -2350,7 +2350,7 @@ __register_chrdev_p(unsigned int major, unsigned int b for (i = baseminor; i < baseminor + count; i++) { cdev = cdev_alloc(); - cdev_init(cdev, fops); + cdev->ops = fops; kobject_set_name(&cdev->kobj, name); ret = cdev_add_ext(cdev, makedev(major, i), uid, gid, mode);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904252154.x3PLsW6K097376>