if (dev >= MAX_OBD_DEVICES)
return -ENODEV;
obd_dev[dev].obd_refcnt++;
- CDEBUG(D_PSDEV, "Refcount now %d\n", obd_dev[dev].obd_refcnt++);
+ CDEBUG(D_PSDEV, "Refcount now %d\n", obd_dev[dev].obd_refcnt);
MOD_INC_USE_COUNT;
EXIT;
return -ENODEV;
fsync_dev(inode->i_rdev);
if (obd_dev[dev].obd_refcnt <= 0)
- printk(KERN_ALERT "presto_psdev_release: refcount(%d) <= 0\n",
+ printk(KERN_ALERT "obd_class_release: refcount(%d) <= 0\n",
obd_dev[dev].obd_refcnt);
obd_dev[dev].obd_refcnt--;
- CDEBUG(D_PSDEV, "Refcount now %d\n", obd_dev[dev].obd_refcnt++);
-
+ CDEBUG(D_PSDEV, "Refcount now %d\n", obd_dev[dev].obd_refcnt);
MOD_DEC_USE_COUNT;
EXIT;
obddev->obd_type->typ_name);
if ( !obddev->obd_type->typ_ops ||
!obddev->obd_type->typ_ops->o_setup ) {
+ obddev->obd_type->typ_refcnt++;
obddev->obd_flags |= OBD_SET_UP;
return 0;
}