Lines Matching refs:nfit_res
1599 struct nfit_test_resource *nfit_res = data; in release_nfit_res() local
1602 list_del(&nfit_res->list); in release_nfit_res()
1605 if (resource_size(&nfit_res->res) >= DIMM_SIZE) in release_nfit_res()
1606 gen_pool_free(nfit_pool, nfit_res->res.start, in release_nfit_res()
1607 resource_size(&nfit_res->res)); in release_nfit_res()
1608 vfree(nfit_res->buf); in release_nfit_res()
1609 kfree(nfit_res); in release_nfit_res()
1616 struct nfit_test_resource *nfit_res = kzalloc(sizeof(*nfit_res), in __test_alloc() local
1620 if (!buf || !nfit_res || !*dma) in __test_alloc()
1622 rc = devm_add_action(dev, release_nfit_res, nfit_res); in __test_alloc()
1625 INIT_LIST_HEAD(&nfit_res->list); in __test_alloc()
1627 nfit_res->dev = dev; in __test_alloc()
1628 nfit_res->buf = buf; in __test_alloc()
1629 nfit_res->res.start = *dma; in __test_alloc()
1630 nfit_res->res.end = *dma + size - 1; in __test_alloc()
1631 nfit_res->res.name = "NFIT"; in __test_alloc()
1632 spin_lock_init(&nfit_res->lock); in __test_alloc()
1633 INIT_LIST_HEAD(&nfit_res->requests); in __test_alloc()
1635 list_add(&nfit_res->list, &t->resources); in __test_alloc()
1638 return nfit_res->buf; in __test_alloc()
1644 kfree(nfit_res); in __test_alloc()
1668 struct nfit_test_resource *n, *nfit_res = NULL; in nfit_test_lookup() local
1677 nfit_res = n; in nfit_test_lookup()
1682 nfit_res = n; in nfit_test_lookup()
1687 if (nfit_res) in nfit_test_lookup()
1688 return nfit_res; in nfit_test_lookup()