libxl: stop using aodev->device_config in libxl__device_pci_add()...
authorPaul Durrant <pdurrant@amazon.com>
Tue, 8 Dec 2020 19:30:16 +0000 (19:30 +0000)
committerWei Liu <wl@xen.org>
Tue, 15 Dec 2020 16:24:23 +0000 (16:24 +0000)
commitb5429d65e1827c4086b2195f594574abd65eb46d
treed250d0cc38c7df6b485d4a58b7f04c78643773e9
parenta825ab3a6b16d216660e689b082e979dd991ca95
libxl: stop using aodev->device_config in libxl__device_pci_add()...

... to hold a pointer to the device.

There is already a 'pci' field in 'pci_add_state' so simply use that from
the start. This also allows the 'pci' (#3) argument to be dropped from
do_pci_add().

NOTE: This patch also changes the type of the 'pci_domid' field in
      'pci_add_state' from 'int' to 'libxl_domid' which is more appropriate
      given what the field is used for.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libs/light/libxl_pci.c