goto out;
err = -EROFS;
- if ((!(tape->flags & PT_WRITE_OK)) && (file->f_mode & 2))
+ if ((!(tape->flags & PT_WRITE_OK)) && (file->f_mode & FMODE_WRITE))
goto out;
if (!(iminor(inode) & 128))
for (unit = 0; unit < PT_UNITS; unit++)
if (pt[unit].present) {
- device_create(pt_class, NULL, MKDEV(major, unit),
+ device_create(pt_class, NULL, MKDEV(major, unit), NULL,
"pt%d", unit);
device_create(pt_class, NULL, MKDEV(major, unit + 128),
- "pt%dn", unit);
+ NULL, "pt%dn", unit);
}
goto out;