Lines Matching refs:lm
1306 static int ca91cx42_lm_set(struct vme_lm_resource *lm, in ca91cx42_lm_set() argument
1314 bridge = lm->parent->driver_priv; in ca91cx42_lm_set()
1315 dev = lm->parent->parent; in ca91cx42_lm_set()
1325 mutex_lock(&lm->mtx); in ca91cx42_lm_set()
1328 for (i = 0; i < lm->monitors; i++) { in ca91cx42_lm_set()
1330 mutex_unlock(&lm->mtx); in ca91cx42_lm_set()
1348 mutex_unlock(&lm->mtx); in ca91cx42_lm_set()
1366 mutex_unlock(&lm->mtx); in ca91cx42_lm_set()
1374 static int ca91cx42_lm_get(struct vme_lm_resource *lm, in ca91cx42_lm_get() argument
1380 bridge = lm->parent->driver_priv; in ca91cx42_lm_get()
1382 mutex_lock(&lm->mtx); in ca91cx42_lm_get()
1407 mutex_unlock(&lm->mtx); in ca91cx42_lm_get()
1417 static int ca91cx42_lm_attach(struct vme_lm_resource *lm, int monitor, in ca91cx42_lm_attach() argument
1424 bridge = lm->parent->driver_priv; in ca91cx42_lm_attach()
1425 dev = lm->parent->parent; in ca91cx42_lm_attach()
1427 mutex_lock(&lm->mtx); in ca91cx42_lm_attach()
1432 mutex_unlock(&lm->mtx); in ca91cx42_lm_attach()
1439 mutex_unlock(&lm->mtx); in ca91cx42_lm_attach()
1458 mutex_unlock(&lm->mtx); in ca91cx42_lm_attach()
1466 static int ca91cx42_lm_detach(struct vme_lm_resource *lm, int monitor) in ca91cx42_lm_detach() argument
1471 bridge = lm->parent->driver_priv; in ca91cx42_lm_detach()
1473 mutex_lock(&lm->mtx); in ca91cx42_lm_detach()
1494 mutex_unlock(&lm->mtx); in ca91cx42_lm_detach()
1617 struct vme_lm_resource *lm; in ca91cx42_probe() local
1769 lm = kmalloc(sizeof(struct vme_lm_resource), GFP_KERNEL); in ca91cx42_probe()
1770 if (lm == NULL) { in ca91cx42_probe()
1776 lm->parent = ca91cx42_bridge; in ca91cx42_probe()
1777 mutex_init(&lm->mtx); in ca91cx42_probe()
1778 lm->locked = 0; in ca91cx42_probe()
1779 lm->number = 1; in ca91cx42_probe()
1780 lm->monitors = 4; in ca91cx42_probe()
1781 list_add_tail(&lm->list, &ca91cx42_bridge->lm_resources); in ca91cx42_probe()
1830 lm = list_entry(pos, struct vme_lm_resource, list); in ca91cx42_probe()
1832 kfree(lm); in ca91cx42_probe()
1880 struct vme_lm_resource *lm; in ca91cx42_remove() local
1914 lm = list_entry(pos, struct vme_lm_resource, list); in ca91cx42_remove()
1916 kfree(lm); in ca91cx42_remove()