Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 May 2019 09:38:24 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r347053 - stable/11/sys/compat/linuxkpi/common/src
Message-ID:  <201905030938.x439cOrI014118@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri May  3 09:38:23 2019
New Revision: 347053
URL: https://svnweb.freebsd.org/changeset/base/347053

Log:
  MFC r346712:
  Don't call cdev_init where cdev_alloc is called. cdev_alloc already
  handles initialization.

Modified:
  stable/11/sys/compat/linuxkpi/common/src/linux_compat.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c	Fri May  3 08:42:49 2019	(r347052)
+++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c	Fri May  3 09:38:23 2019	(r347053)
@@ -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?201905030938.x439cOrI014118>