coe: update for compilation against newer kernels

The 'no_llseek' definition was removed in Linux v6.12. Use
NV_NO_LLSEEK_PRESENT to check if it should be defined.

The 'remove' callback of the 'platform_driver" structure was updated in
Linux v6.11 to return void instead of int.

Update rtcpu-coe.c so that it properly handles the above cases.

Bug 5466808

Change-Id: I9306840f0b4a9e5a59a5c161ac3c58af2a70a4ed
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3436078
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Brad Griffis
2025-08-20 00:01:44 +00:00
committed by mobile promotions
parent c1ba8c8eae
commit c959e9d1dc

View File

@@ -1466,7 +1466,9 @@ static int coe_fop_channel_release(
static const struct file_operations coe_channel_fops = { static const struct file_operations coe_channel_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
#if defined(NV_NO_LLSEEK_PRESENT)
.llseek = no_llseek, .llseek = no_llseek,
#endif
.unlocked_ioctl = coe_fop_channel_ioctl, .unlocked_ioctl = coe_fop_channel_ioctl,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = coe_fop_channel_ioctl, .compat_ioctl = coe_fop_channel_ioctl,
@@ -1959,6 +1961,18 @@ static int camrtc_coe_remove(struct platform_device *pdev)
return 0; return 0;
} }
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static void camrtc_coe_remove_wrapper(struct platform_device *pdev)
{
camrtc_coe_remove(pdev);
}
#else
static int camrtc_coe_remove_wrapper(struct platform_device *pdev)
{
return camrtc_coe_remove(pdev);
}
#endif
static const struct of_device_id camrtc_coe_of_match[] = { static const struct of_device_id camrtc_coe_of_match[] = {
{ .compatible = "nvidia,tegra-camrtc-capture-coe" }, { .compatible = "nvidia,tegra-camrtc-capture-coe" },
{}, {},
@@ -1967,7 +1981,7 @@ MODULE_DEVICE_TABLE(of, camrtc_coe_of_match);
static struct platform_driver capture_coe_driver = { static struct platform_driver capture_coe_driver = {
.probe = camrtc_coe_probe, .probe = camrtc_coe_probe,
.remove = camrtc_coe_remove, .remove = camrtc_coe_remove_wrapper,
.driver = { .driver = {
.name = "camrtc-coe", .name = "camrtc-coe",
.owner = THIS_MODULE, .owner = THIS_MODULE,