Skip to content

Commit ae63908

Browse files
ngphibangkartben
authored andcommitted
drivers: video: ov5640: Drop cur_pixrate internal variable
Update the control value directly. No need for an internal variable. Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
1 parent 33ff1f6 commit ae63908

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/video/ov5640.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ struct ov5640_ctrls {
164164
struct ov5640_data {
165165
struct ov5640_ctrls ctrls;
166166
struct video_format fmt;
167-
uint64_t cur_pixrate;
168167
uint16_t cur_frmrate;
169168
const struct ov5640_mode_config *cur_mode;
170169
};
@@ -811,10 +810,9 @@ static int ov5640_set_frmival(const struct device *dev, struct video_frmival *fr
811810
}
812811

813812
drv_data->cur_frmrate = best_match;
814-
drv_data->cur_pixrate = drv_data->cur_mode->mipi_frmrate_config[ind].pixelrate;
815813

816814
/* Update pixerate control */
817-
drv_data->ctrls.pixel_rate.val = drv_data->cur_pixrate;
815+
drv_data->ctrls.pixel_rate.val64 = drv_data->cur_mode->mipi_frmrate_config[ind].pixelrate;
818816

819817
frmival->numerator = 1;
820818
frmival->denominator = best_match;

0 commit comments

Comments
 (0)