raw/ifpga/base: free resources when destroying device
authorWei Huang <wei.huang@intel.com>
Fri, 23 Oct 2020 08:59:58 +0000 (04:59 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:32:43 +0000 (23:32 +0100)
commit82255e036acc95ff219af32ec9be385583d97368
tree335423ad900f49646ed324bcda4cb856f935889f
parent93824cadd8f430d14c91e48146a99f90e8d31f28
raw/ifpga/base: free resources when destroying device

Add two functions to complete the resource free work, one is
'ifpga_adapter_destroy()', the other is 'ifpga_bus_uinit()'.

Then call 'opae_adapter_destroy()' and 'opae_adapter_data_free()'
in 'ifpga_rawdev_close()' to free resources.

Also 'opae_adapter_free()' is removed from 'ifpga_rawdev_destroy()',
because opae adapter is pointed by dev_private member in raw_dev,
it will be freed in 'rte_rawdev_pmd_release()'.

Signed-off-by: Wei Huang <wei.huang@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
drivers/raw/ifpga/base/ifpga_api.c
drivers/raw/ifpga/base/ifpga_enumerate.c
drivers/raw/ifpga/base/ifpga_enumerate.h
drivers/raw/ifpga/ifpga_rawdev.c