Lines Matching refs:sum_mgr
364 struct sum_mgr *mgr) in sum_rsc_init()
383 static int get_sum_rsc(struct sum_mgr *mgr, in get_sum_rsc()
434 static int put_sum_rsc(struct sum_mgr *mgr, struct sum *sum) in put_sum_rsc()
453 struct sum_mgr *sum_mgr; in sum_mgr_create() local
456 sum_mgr = kzalloc(sizeof(*sum_mgr), GFP_KERNEL); in sum_mgr_create()
457 if (!sum_mgr) in sum_mgr_create()
460 err = rsc_mgr_init(&sum_mgr->mgr, SUM, SUM_RESOURCE_NUM, hw); in sum_mgr_create()
464 spin_lock_init(&sum_mgr->mgr_lock); in sum_mgr_create()
466 sum_mgr->get_sum = get_sum_rsc; in sum_mgr_create()
467 sum_mgr->put_sum = put_sum_rsc; in sum_mgr_create()
468 sum_mgr->card = hw->card; in sum_mgr_create()
470 *rsum_mgr = sum_mgr; in sum_mgr_create()
475 kfree(sum_mgr); in sum_mgr_create()
481 struct sum_mgr *sum_mgr = ptr; in sum_mgr_destroy() local
482 rsc_mgr_uninit(&sum_mgr->mgr); in sum_mgr_destroy()
483 kfree(sum_mgr); in sum_mgr_destroy()