mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
tegra_hv: Use const in class attributes APIs for Linux 6.4 and above
The callback APIs of class attribute are updated on Linux6.4 and above to have the constant type pointer argument. Update the driver compatible with the updated APIs for Linux 6.4 and above. Bug 4370594 Change-Id: Ic06cb0d752797bb272f110aa0bb35bdd3afa1e6a Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3013107 GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
515f73fcd6
commit
c8a83b5692
7
Makefile
7
Makefile
@@ -9,6 +9,7 @@ subdir-ccflags-y += -Werror
|
|||||||
LINUX_VERSION := $(shell expr $(VERSION) \* 256 + $(PATCHLEVEL))
|
LINUX_VERSION := $(shell expr $(VERSION) \* 256 + $(PATCHLEVEL))
|
||||||
LINUX_VERSION_6_2 := $(shell expr 6 \* 256 + 2)
|
LINUX_VERSION_6_2 := $(shell expr 6 \* 256 + 2)
|
||||||
LINUX_VERSION_6_3 := $(shell expr 6 \* 256 + 3)
|
LINUX_VERSION_6_3 := $(shell expr 6 \* 256 + 3)
|
||||||
|
LINUX_VERSION_6_4 := $(shell expr 6 \* 256 + 4)
|
||||||
LINUX_VERSION_6_6 := $(shell expr 6 \* 256 + 6)
|
LINUX_VERSION_6_6 := $(shell expr 6 \* 256 + 6)
|
||||||
|
|
||||||
# The Tegra IVC driver was updated to support iosys-map in Linux v6.2.
|
# The Tegra IVC driver was updated to support iosys-map in Linux v6.2.
|
||||||
@@ -26,6 +27,12 @@ ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_3); echo $$?),0)
|
|||||||
export CONFIG_TEGRA_GPIO_LEGACY_DISABLE=y
|
export CONFIG_TEGRA_GPIO_LEGACY_DISABLE=y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Changes done in Linux 6.4 onwards
|
||||||
|
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_4); echo $$?),0)
|
||||||
|
# Argument on class attribute callback changed to constant type
|
||||||
|
subdir-ccflags-y += -DNV_CLASS_ATTRIBUTE_STRUCT_HAS_CONST_STRUCT_CLASS_ARG
|
||||||
|
endif
|
||||||
|
|
||||||
# Changes done in Linux 6.6 onwards
|
# Changes done in Linux 6.6 onwards
|
||||||
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_6); echo $$?),0)
|
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_6); echo $$?),0)
|
||||||
# Move probe to DAI Ops.
|
# Move probe to DAI Ops.
|
||||||
|
|||||||
@@ -393,8 +393,13 @@ static void tegra_hv_cleanup(struct tegra_hv_data *hvd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(NV_CLASS_ATTRIBUTE_STRUCT_HAS_CONST_STRUCT_CLASS_ARG)
|
||||||
|
static ssize_t vmid_show(const struct class *class,
|
||||||
|
const struct class_attribute *attr, char *buf)
|
||||||
|
#else
|
||||||
static ssize_t vmid_show(struct class *class,
|
static ssize_t vmid_show(struct class *class,
|
||||||
struct class_attribute *attr, char *buf)
|
struct class_attribute *attr, char *buf)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct tegra_hv_data *hvd = get_hvd();
|
struct tegra_hv_data *hvd = get_hvd();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user