video: camera: Fix rtcpu build for Linux v5.14

The RTCPU driver fails to build with Linux v5.14 as an out-of-tree
module because the return type of the bus_type remove callback is int
and not void. Make the necessary changes to allow the RTCPU driver to
build for Linux v5.14+ kernels.

Bug 3820317

Change-Id: I127d9ff2ae12901f85374e3e8feabc77e0d17407
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2820711
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2022-12-02 13:20:17 +00:00
committed by mobile promotions
parent 32b805cab1
commit dc420b6a6d

View File

@@ -11,6 +11,7 @@
#include <linux/tegra-ivc-bus.h>
#include <linux/tegra-camera-rtcpu.h>
#include <linux/bitops.h>
#include <linux/version.h>
#include "soc/tegra/camrtc-channels.h"
#include "soc/tegra/camrtc-commands.h"
@@ -390,7 +391,11 @@ static int tegra_ivc_bus_probe(struct device *dev)
return ret;
}
#if (KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE)
static void tegra_ivc_bus_remove(struct device *dev)
#else
static int tegra_ivc_bus_remove(struct device *dev)
#endif
{
if (dev->type == &tegra_ivc_channel_type) {
struct tegra_ivc_driver *drv = to_tegra_ivc_driver(dev->driver);
@@ -406,7 +411,9 @@ static void tegra_ivc_bus_remove(struct device *dev)
}
return;
#if (KERNEL_VERSION(5, 15, 0) > LINUX_VERSION_CODE)
return 0;
#endif
}
static int tegra_ivc_bus_ready_child(struct device *dev, void *data)