mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
Remove static dev node meta data from struct nvgpu_os_linux and replace it by a dynamic list. Struct nvgpu_os_linux will only keep track of list head and number of entries. Add new structure nvgpu_cdev to store meta data of each dev node and create/setup it dynamically in gk20a_user_init(). Once done, add the new node under list head maintained in nvgpu_os_linux. Add a static list dev_node_list[] that contains list of dev node names and file operations. This static list is used to create nvgpu_cdev data structures and to register new device nodes. Update all dev node open file operations (e.g. gk20a_as_dev_open()) to extract struct gk20a pointer from device pointer of dev node. gk20a device is the parent of dev node device. Jira NVGPU-5648 Change-Id: If070c3428afd6215e45b4919335d9f43e04c36f9 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2428500 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit