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
This commit is contained in:
parent
da939962ce
commit
2a1acc9885
@ -2328,7 +2328,7 @@ __register_chrdev(unsigned int major, unsigned int baseminor,
|
||||
|
||||
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 baseminor,
|
||||
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user