From 9a93dc3c83d1d0d81b4340744d44b9c4735caa8f Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Fri, 12 Jun 2020 16:16:35 -0700 Subject: [PATCH] gpu: nvgpu: mv struct nvgpu_device_list to header Move the struct nvgpu_device_list from device.c to device.h, so that unit tests have access to the struct. Bug 2984984 Change-Id: Ie6ec6c8dd8f40c28b98964f832b92fdbae73169f Signed-off-by: Peter Daifuku Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2360308 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/common/device.c | 14 -------------- drivers/gpu/nvgpu/include/nvgpu/device.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/nvgpu/common/device.c b/drivers/gpu/nvgpu/common/device.c index 40f8c7725..47da59b89 100644 --- a/drivers/gpu/nvgpu/common/device.c +++ b/drivers/gpu/nvgpu/common/device.c @@ -35,20 +35,6 @@ nvgpu_device_from_dev_list_node(struct nvgpu_list_node *node) dev_list_node)); }; -struct nvgpu_device_list { - /** - * Array of lists of devices; each list corresponds to one type of - * device. By having this as an array it's trivial to go from device - * enum type in the HW to the relevant devlist. - */ - struct nvgpu_list_node devlist_heads[NVGPU_MAX_DEVTYPE]; - - /** - * Keep track of how many devices of each type exist. - */ - u32 dev_counts[NVGPU_MAX_DEVTYPE]; -}; - /* * Faciliate the parsing of the TOP array describing the devices present in the * GPU. diff --git a/drivers/gpu/nvgpu/include/nvgpu/device.h b/drivers/gpu/nvgpu/include/nvgpu/device.h index c12580add..9beac0411 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/device.h +++ b/drivers/gpu/nvgpu/include/nvgpu/device.h @@ -149,6 +149,20 @@ struct nvgpu_device { /** @endcond DOXYGEN_SHOULD_SKIP_THIS */ }; +struct nvgpu_device_list { + /** + * Array of lists of devices; each list corresponds to one type of + * device. By having this as an array it's trivial to go from device + * enum type in the HW to the relevant devlist. + */ + struct nvgpu_list_node devlist_heads[NVGPU_MAX_DEVTYPE]; + + /** + * Keep track of how many devices of each type exist. + */ + u32 dev_counts[NVGPU_MAX_DEVTYPE]; +}; + /** * @brief Initialize the SW device list from the HW device list. *