nvidia-oot: changes to fix compilation error

Using this patch we are fixing below compilaiton error
with stable kernel.
1. nvidia-oot/drivers/block/tegra_virt_storage/tegra_hv_vblk.c:936:16:
   error: implicit declaration of function ___alloc_disk_node_;
   vblkdev->gd = __alloc_disk_node(vblkdev->queue, NUMA_NO_NODE, NULL);
      |              ^
2. nvidia-oot/drivers/block/tegra_virt_storage/tegra_hv_vblk.c:1176:3:
   error: implicit declaration of function _blk_cleanup_queue_
   [-Werror=implicit-function-declaration]
   1176 |   blk_cleanup_queue(vblkdev->queue);
      |   ^~~~~~~~~~~~~~~~~

Bug 3767126

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Id0df2c15c42d4dcbae95f1ef33517d096bf96d06
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2787165
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Manish Bhardwaj
2022-10-05 13:12:58 +05:30
committed by mobile promotions
parent 943cc4d854
commit eda5ce0144

View File

@@ -932,8 +932,12 @@ static void setup_device(struct vblk_dev *vblkdev)
#endif
}
#if KERNEL_VERSION(5, 19, 0) >= LINUX_VERSION_CODE
/* And the gendisk structure. */
vblkdev->gd = __alloc_disk_node(vblkdev->queue, NUMA_NO_NODE, NULL);
#else
vblkdev->gd = blk_mq_alloc_disk_for_queue(vblkdev->queue, NULL);
#endif
if (!vblkdev->gd) {
dev_err(vblkdev->device, "alloc_disk failure\n");
return;
@@ -1172,8 +1176,10 @@ static int tegra_hv_vblk_remove(struct platform_device *pdev)
put_disk(vblkdev->gd);
}
#if KERNEL_VERSION(5, 19, 0) >= LINUX_VERSION_CODE
if (vblkdev->queue)
blk_cleanup_queue(vblkdev->queue);
#endif
destroy_workqueue(vblkdev->wq);
tegra_hv_ivc_unreserve(vblkdev->ivck);