Skip to content

Build failure with v6.8-ccs.patch #92

@alfaiptvserver

Description

@alfaiptvserver

Build failure with v6.8-ccs.patch - Incorrect pm_runtime_get_if_active() parameters

Description

The media_build/backports/v6.8-ccs.patch file contains an incorrect patch that causes build failures on kernel 6.8. The patch incorrectly adds a second parameter to the pm_runtime_get_if_active() function call, which is not compatible with kernel 6.8's API.

Current Issue

The current patch in v6.8-ccs.patch incorrectly modifies the function call:

diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index b2d220d1a079..49e0d9a09530 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -665,7 +665,7 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_status = pm_runtime_get_if_active(&client->dev);
+	pm_status = pm_runtime_get_if_active(&client->dev, true);
 	if (!pm_status)
 		return 0;

Expected Behavior

For kernel 6.8, the pm_runtime_get_if_active() function only accepts one parameter. The patch should not modify this line at all:

diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index b2d220d1a079..49e0d9a09530 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -665,7 +665,7 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_status = pm_runtime_get_if_active(&client->dev);
+	pm_status = pm_runtime_get_if_active(&client->dev);
 	if (!pm_status)
 		return 0;

Error Message

During the build process, this causes a compilation error due to too many arguments passed to the pm_runtime_get_if_active() function.

Environment

  • Kernel version: 6.8
  • Affected file: media_build/backports/v6.8-ccs.patch
  • Driver: CCS (drivers/media/i2c/ccs/ccs-core.c)

Proposed Solution

The line should remain unchanged in the v6.8 backport patch, as kernel 6.8's pm_runtime_get_if_active() API expects only one parameter. The second parameter (true) was likely introduced in a later kernel version and should not be backported to 6.8.

Steps to Reproduce

  1. Apply the current v6.8-ccs.patch to kernel 6.8 sources
  2. Attempt to build the CCS driver
  3. Build fails with "too many arguments to function 'pm_runtime_get_if_active'" error

Additional Notes

This appears to be a backport compatibility issue where a newer kernel API change was incorrectly applied to an older kernel version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions