From 272be41c99a463ca7f110fdd96361432c70c9f97 Mon Sep 17 00:00:00 2001 From: Manish Bhardwaj Date: Fri, 30 Sep 2022 00:18:17 +0530 Subject: [PATCH] nvidia: vblk: fix compilation error in Linux v5.18 the following upstream commit removes genhd.h and now only blkdev.h is needed. commit 322cbb50de711814c42fb088f6d31901502c711a Author: Christoph Hellwig Date: Mon Jan 24 10:39:13 2022 +0100 block: remove genhd.h Using this change we are fixing below compilation error while upgrading the stable kernel. /dvs/git/dirty/git-master_linux/out/nvidia/kernel-nvidia-oot/ nvidia-oot/drivers/block/tegra_virt_storage/tegra_vblk.h:9:10: fatal error: linux/genhd.h: No such file or directory 9 | #include | ^~~~~~~~~~~~~~~ compilation terminated. Bug 3733730 Signed-off-by: Manish Bhardwaj Change-Id: Ib110b749ca48fed092fcadb9a6ab47d81cc25397 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2784497 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/block/tegra_virt_storage/tegra_vblk.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/block/tegra_virt_storage/tegra_vblk.h b/drivers/block/tegra_virt_storage/tegra_vblk.h index 94ddcb8c..5f032c90 100644 --- a/drivers/block/tegra_virt_storage/tegra_vblk.h +++ b/drivers/block/tegra_virt_storage/tegra_vblk.h @@ -6,7 +6,10 @@ #ifndef _TEGRA_VBLK_H_ #define _TEGRA_VBLK_H_ +#include +#if KERNEL_VERSION(5, 19, 0) > LINUX_VERSION_CODE #include +#endif #include #include #include