-
Notifications
You must be signed in to change notification settings - Fork 7.8k
drivers: video: emul_rx: hotfix: force use of constant value #88890
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -365,11 +365,13 @@ static DEVICE_API(video, nxp_video_sdma_api) = { | |
.flush = nxp_video_sdma_flush | ||
}; | ||
|
||
#define SOURCE_DEV(inst) DEVICE_DT_GET(DT_INST_PHANDLE(inst, sensor)) | ||
|
||
#define NXP_VIDEO_SDMA_INIT(inst) \ | ||
PINCTRL_DT_INST_DEFINE(inst); \ | ||
const struct nxp_video_sdma_config sdma_config_##inst = { \ | ||
.dma_dev = DEVICE_DT_GET(DT_INST_PARENT(inst)), \ | ||
.sensor_dev = DEVICE_DT_GET(DT_INST_PHANDLE(inst, sensor)), \ | ||
.sensor_dev = SOURCE_DEV(n), \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked not thoroughly enough. Thank you for the vigilance. |
||
.pincfg = PINCTRL_DT_INST_DEV_CONFIG_GET(inst), \ | ||
.vsync_pin = DT_INST_PROP(inst, vsync_pin), \ | ||
.hsync_pin = DT_INST_PROP(inst, hsync_pin), \ | ||
|
@@ -383,6 +385,6 @@ static DEVICE_API(video, nxp_video_sdma_api) = { | |
&sdma_config_##inst, POST_KERNEL, \ | ||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &nxp_video_sdma_api); \ | ||
\ | ||
VIDEO_DEVICE_DEFINE(sdma_##inst, DEVICE_DT_INST_GET(inst), sdma_config_##inst.sensor_dev); | ||
VIDEO_DEVICE_DEFINE(sdma_##inst, DEVICE_DT_INST_GET(inst), SOURCE_DEV(inst)); | ||
|
||
DT_INST_FOREACH_STATUS_OKAY(NXP_VIDEO_SDMA_INIT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regardless of this being an LLVM issue or not, to me it makes perfect sense to use the DT value here directly, instead of passing it with a struct field.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No clean-up commit needed after it gets merged, then. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.