Lines Matching refs:sum_mgr
363 struct sum_mgr *mgr) in sum_rsc_init()
382 static int get_sum_rsc(struct sum_mgr *mgr, in get_sum_rsc()
433 static int put_sum_rsc(struct sum_mgr *mgr, struct sum *sum) in put_sum_rsc()
449 int sum_mgr_create(struct hw *hw, struct sum_mgr **rsum_mgr) in sum_mgr_create()
452 struct sum_mgr *sum_mgr; in sum_mgr_create() local
455 sum_mgr = kzalloc(sizeof(*sum_mgr), GFP_KERNEL); in sum_mgr_create()
456 if (!sum_mgr) in sum_mgr_create()
459 err = rsc_mgr_init(&sum_mgr->mgr, SUM, SUM_RESOURCE_NUM, hw); in sum_mgr_create()
463 spin_lock_init(&sum_mgr->mgr_lock); in sum_mgr_create()
465 sum_mgr->get_sum = get_sum_rsc; in sum_mgr_create()
466 sum_mgr->put_sum = put_sum_rsc; in sum_mgr_create()
467 sum_mgr->card = hw->card; in sum_mgr_create()
469 *rsum_mgr = sum_mgr; in sum_mgr_create()
474 kfree(sum_mgr); in sum_mgr_create()
478 int sum_mgr_destroy(struct sum_mgr *sum_mgr) in sum_mgr_destroy() argument
480 rsc_mgr_uninit(&sum_mgr->mgr); in sum_mgr_destroy()
481 kfree(sum_mgr); in sum_mgr_destroy()