Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video samples fail to build #34184

Closed
galak opened this issue Apr 10, 2021 · 2 comments · Fixed by #34186
Closed

video samples fail to build #34184

galak opened this issue Apr 10, 2021 · 2 comments · Fixed by #34186
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug

Comments

@galak
Copy link
Collaborator

galak commented Apr 10, 2021

The following samples fail to build:

samples/subsys/video/capture/sample.video.capture in mimxrt1064_evk:samples/subsys/video/capture/sample.video
samples/subsys/video/tcpserversink/sample.video.tcpserversink in mimxrt1064_evk:samples/subsys/video/tcpserversink/sample.video

Failure is of form:

/workdir/zephyr/drivers/video/video_sw_generator.c: In function 'video_sw_generator_stream_stop':
/workdir/zephyr/drivers/video/video_sw_generator.c:66:2: error: too few arguments to function 'k_work_cancel_delayable_sync'
   66 |  k_work_cancel_delayable_sync(&data->buf_work);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../../../../../include/zephyr.h:18,
                 from /workdir/zephyr/drivers/video/video_sw_generator.c:6:
../../../../../../../include/kernel.h:3363:6: note: declared here
 3363 | bool k_work_cancel_delayable_sync(struct k_work_delayable *dwork,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
@galak galak added the bug The issue is a bug, or the PR is fixing a bug label Apr 10, 2021
@galak galak added the priority: high High impact/importance bug label Apr 10, 2021
@galak
Copy link
Collaborator Author

galak commented Apr 10, 2021

Possible fix:

diff --git a/drivers/video/video_sw_generator.c b/drivers/video/video_sw_generator.c
index 2b78d44e84..5514b6b9e2 100644
--- a/drivers/video/video_sw_generator.c
+++ b/drivers/video/video_sw_generator.c
@@ -63,7 +63,7 @@ static int video_sw_generator_stream_stop(const struct device *dev)
 {
        struct video_sw_generator_data *data = dev->data;
 
-       k_work_cancel_delayable_sync(&data->buf_work);
+       k_work_cancel_delayable_sync(&data->buf_work, NULL);
 
        return 0;
 }

@loicpoulain
Copy link
Collaborator

cf #34186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants