From c9b1539c37612862f699883293be566cf6405790 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Tue, 31 Oct 2023 12:52:20 +0000 Subject: [PATCH] hwmon: Replace probe_new to probe for Linux6.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The probe_new is removed from the Linux 6.6. in following change: --- commit 5eb1e6e459cfa025f79c43014f66ff62a55542f1 Author: Uwe Kleine-König i2c: Drop legacy callback .probe_new() ---- Bug 4346767 Change-Id: Idf90cd0f6536bb4e886467679b71c37f97e009a5 Signed-off-by: Laxman Dewangan Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3007384 Reviewed-by: Bitan Biswas --- Makefile | 3 +++ drivers/hwmon/f75308.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Makefile b/Makefile index c109adaa..f3d2c2e4 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,9 @@ ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_6); echo $$?),0) # Move probe to DAI Ops. export CONFIG_SND_SOC_MOVE_DAI_PROBE_TO_OPS=y subdir-ccflags-y += -DNV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_ARG + +# probe_new is removed from i2c driver structure +subdir-ccflags-y += -DNV_I2C_LEGACY_PROBE_NEW_REMOVED endif ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y) diff --git a/drivers/hwmon/f75308.c b/drivers/hwmon/f75308.c index ba9fc2cf..bfb0e96c 100644 --- a/drivers/hwmon/f75308.c +++ b/drivers/hwmon/f75308.c @@ -1256,7 +1256,11 @@ static struct i2c_driver f75308_driver = { .of_match_table = of_match_ptr(f75308_match_table), }, .detect = f75308_detect, +#if defined(NV_I2C_LEGACY_PROBE_NEW_REMOVED) + .probe = f75308_probe, +#else .probe_new = f75308_probe, +#endif .remove = f75308_remove, .address_list = f75308_addr, .id_table = f75308_id,