Skip to content

Commit 84ee49e

Browse files
committed
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 c016fdf commit 84ee49e

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
};
@@ -812,10 +811,9 @@ static int ov5640_set_frmival(const struct device *dev, enum video_endpoint_id e
812811
}
813812

814813
drv_data->cur_frmrate = best_match;
815-
drv_data->cur_pixrate = drv_data->cur_mode->mipi_frmrate_config[ind].pixelrate;
816814

817815
/* Update pixerate control */
818-
drv_data->ctrls.pixel_rate.val = drv_data->cur_pixrate;
816+
drv_data->ctrls.pixel_rate.val64 = drv_data->cur_mode->mipi_frmrate_config[ind].pixelrate;
819817

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

0 commit comments

Comments
 (0)