- * Find the OBD device associated to a changelog character device.
- * @param[in] cdev character device instance descriptor
- * @return corresponding OBD device or NULL if none was found.
- */
-static struct obd_device *chlg_obd_get(dev_t cdev)
-{
- int minor = MINOR(cdev);
- struct obd_device *obd = NULL;
- struct chlg_registered_dev *curr;
-
- mutex_lock(&chlg_registered_dev_lock);
- list_for_each_entry(curr, &chlg_registered_devices, ced_link) {
- if (curr->ced_misc.minor == minor) {
- /* take the first available OBD device attached */
- obd = list_first_entry(&curr->ced_obds,
- struct obd_device,
- u.cli.cl_chg_dev_linkage);
- break;
- }
- }
- mutex_unlock(&chlg_registered_dev_lock);
- return obd;
-}
-
-/**