- err = devfs_mk_cdev(MKDEV(major, unit),
- S_IFCHR | S_IRUSR | S_IWUSR,
- "pt/%d", unit);
- if (err) {
- class_simple_device_remove(MKDEV(major, unit));
- goto out_class;
- }
- class_simple_device_add(pt_class, MKDEV(major, unit + 128),
+ class_device_create(pt_class, NULL, MKDEV(major, unit + 128),