Skip to content

Commit

Permalink
drivers: video: Place API into iterable section
Browse files Browse the repository at this point in the history
Add wrapper DEVICE_API macro to all video_driver_api instances.

Signed-off-by: Pieter De Gendt <[email protected]>
  • Loading branch information
pdgendt authored and josuah committed Dec 2, 2024
1 parent c19ada9 commit 468f1f4
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion drivers/video/gc2145.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ static int gc2145_set_ctrl(const struct device *dev, unsigned int cid, void *val
}
}

static const struct video_driver_api gc2145_driver_api = {
static DEVICE_API(video, gc2145_driver_api) = {
.set_format = gc2145_set_fmt,
.get_format = gc2145_get_fmt,
.get_caps = gc2145_get_caps,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/mt9m114.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static int mt9m114_get_caps(const struct device *dev, enum video_endpoint_id ep,
return 0;
}

static const struct video_driver_api mt9m114_driver_api = {
static DEVICE_API(video, mt9m114_driver_api) = {
.set_format = mt9m114_set_fmt,
.get_format = mt9m114_get_fmt,
.get_caps = mt9m114_get_caps,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/ov2640.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ static int ov2640_set_ctrl(const struct device *dev,
return ret;
}

static const struct video_driver_api ov2640_driver_api = {
static DEVICE_API(video, ov2640_driver_api) = {
.set_format = ov2640_set_fmt,
.get_format = ov2640_get_fmt,
.get_caps = ov2640_get_caps,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/ov5640.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ static int ov5640_enum_frmival(const struct device *dev, enum video_endpoint_id
return 0;
}

static const struct video_driver_api ov5640_driver_api = {
static DEVICE_API(video, ov5640_driver_api) = {
.set_format = ov5640_set_fmt,
.get_format = ov5640_get_fmt,
.get_caps = ov5640_get_caps,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/ov7670.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ static int ov7670_init(const struct device *dev)
return 0;
}

static const struct video_driver_api ov7670_api = {
static DEVICE_API(video, ov7670_api) = {
.set_format = ov7670_set_fmt,
.get_format = ov7670_get_fmt,
.get_caps = ov7670_get_caps,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/ov7725.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ static int ov7725_get_caps(const struct device *dev,
return 0;
}

static const struct video_driver_api ov7725_driver_api = {
static DEVICE_API(video, ov7725_driver_api) = {
.set_format = ov7725_set_fmt,
.get_format = ov7725_get_fmt,
.get_caps = ov7725_get_caps,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/video_esp32_dvp.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ static int video_esp32_init(const struct device *dev)
return 0;
}

static const struct video_driver_api esp32_driver_api = {
static DEVICE_API(video, esp32_driver_api) = {
/* mandatory callbacks */
.set_format = video_esp32_set_fmt,
.get_format = video_esp32_get_fmt,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/video_mcux_csi.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ static int video_mcux_csi_enum_frmival(const struct device *dev, enum video_endp
return ret;
}

static const struct video_driver_api video_mcux_csi_driver_api = {
static DEVICE_API(video, video_mcux_csi_driver_api) = {
.set_format = video_mcux_csi_set_fmt,
.get_format = video_mcux_csi_get_fmt,
.stream_start = video_mcux_csi_stream_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/video_mcux_mipi_csi2rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ static int mipi_csi2rx_enum_frmival(const struct device *dev, enum video_endpoin
return 0;
}

static const struct video_driver_api mipi_csi2rx_driver_api = {
static DEVICE_API(video, mipi_csi2rx_driver_api) = {
.get_caps = mipi_csi2rx_get_caps,
.get_format = mipi_csi2rx_get_fmt,
.set_format = mipi_csi2rx_set_fmt,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/video_mcux_smartdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ static int nxp_video_sdma_init(const struct device *dev)
return 0;
}

static const struct video_driver_api nxp_video_sdma_api = {
static DEVICE_API(video, nxp_video_sdma_api) = {
.get_format = nxp_video_sdma_get_format,
.set_format = nxp_video_sdma_set_format,
.get_caps = nxp_video_sdma_get_caps,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/video_stm32_dcmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ static inline int video_stm32_dcmi_get_ctrl(const struct device *dev, unsigned i
return ret;
}

static const struct video_driver_api video_stm32_dcmi_driver_api = {
static DEVICE_API(video, video_stm32_dcmi_driver_api) = {
.set_format = video_stm32_dcmi_set_fmt,
.get_format = video_stm32_dcmi_get_fmt,
.stream_start = video_stm32_dcmi_stream_start,
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/video_sw_generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ static int video_sw_generator_enum_frmival(const struct device *dev, enum video_
return 0;
}

static const struct video_driver_api video_sw_generator_driver_api = {
static DEVICE_API(video, video_sw_generator_driver_api) = {
.set_format = video_sw_generator_set_fmt,
.get_format = video_sw_generator_get_fmt,
.stream_start = video_sw_generator_stream_start,
Expand Down

0 comments on commit 468f1f4

Please sign in to comment.