Lines Matching refs:nfit_res
1602 struct nfit_test_resource *nfit_res = data; in release_nfit_res() local
1605 list_del(&nfit_res->list); in release_nfit_res()
1608 if (resource_size(&nfit_res->res) >= DIMM_SIZE) in release_nfit_res()
1609 gen_pool_free(nfit_pool, nfit_res->res.start, in release_nfit_res()
1610 resource_size(&nfit_res->res)); in release_nfit_res()
1611 vfree(nfit_res->buf); in release_nfit_res()
1612 kfree(nfit_res); in release_nfit_res()
1619 struct nfit_test_resource *nfit_res = kzalloc(sizeof(*nfit_res), in __test_alloc() local
1623 if (!buf || !nfit_res || !*dma) in __test_alloc()
1625 rc = devm_add_action(dev, release_nfit_res, nfit_res); in __test_alloc()
1628 INIT_LIST_HEAD(&nfit_res->list); in __test_alloc()
1630 nfit_res->dev = dev; in __test_alloc()
1631 nfit_res->buf = buf; in __test_alloc()
1632 nfit_res->res.start = *dma; in __test_alloc()
1633 nfit_res->res.end = *dma + size - 1; in __test_alloc()
1634 nfit_res->res.name = "NFIT"; in __test_alloc()
1635 spin_lock_init(&nfit_res->lock); in __test_alloc()
1636 INIT_LIST_HEAD(&nfit_res->requests); in __test_alloc()
1638 list_add(&nfit_res->list, &t->resources); in __test_alloc()
1641 return nfit_res->buf; in __test_alloc()
1647 kfree(nfit_res); in __test_alloc()
1671 struct nfit_test_resource *n, *nfit_res = NULL; in nfit_test_lookup() local
1680 nfit_res = n; in nfit_test_lookup()
1685 nfit_res = n; in nfit_test_lookup()
1690 if (nfit_res) in nfit_test_lookup()
1691 return nfit_res; in nfit_test_lookup()