From 2332bac0d75abcab85bda2fe8dbf136f4266ac54 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 20 Dec 2022 12:43:05 +0000 Subject: [PATCH] video: tegra: Fix TI serializer build for Linux v6.1 Upstream Linux commit ed5c2f5fd10d ("i2c: Make remove callback return void") in Linux v6.1, updates the i2c remove callback to prototype to return void instead of int. This is causes the TI FPDLink DP Serializer driver build to fail for Linux v6.1. Update this driver to fix the build for Linux v6.1. Bug 3820317 Bug 3835208 Change-Id: I35c3ac90070b7324330c31dc69d06f53cecd5b67 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2831358 Reviewed-by: svc_kernel_abi Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-cert Reviewed-by: Laxman Dewangan GVS: Gerrit_Virtual_Submit --- drivers/video/tegra/dc/bridge/ti_fpdlink_dp_serializer.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/video/tegra/dc/bridge/ti_fpdlink_dp_serializer.c b/drivers/video/tegra/dc/bridge/ti_fpdlink_dp_serializer.c index 486e6d96..c0874814 100644 --- a/drivers/video/tegra/dc/bridge/ti_fpdlink_dp_serializer.c +++ b/drivers/video/tegra/dc/bridge/ti_fpdlink_dp_serializer.c @@ -30,6 +30,7 @@ #include #include #include +#include // Target I2C register address #define TI_TARGET_ID_0 0x70 @@ -1020,14 +1021,20 @@ static int ti_fpdlink_dp_ser_probe(struct i2c_client *client) return ret; } +#if KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE +static void ti_fpdlink_dp_ser_remove(struct i2c_client *client) +#else static int ti_fpdlink_dp_ser_remove(struct i2c_client *client) +#endif { struct ti_fpdlink_dp_ser_priv *priv = i2c_get_clientdata(client); i2c_unregister_device(client); gpiod_set_value_cansleep(priv->gpiod_pwrdn, 0); +#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE return 0; +#endif } static const struct of_device_id ti_fpdlink_dp_ser_dt_ids[] = {