Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: ov5640: Change horizontal and vertical resolutions name

The current width and height parameters in the struct ov5640_mode_info are
actually the active horizontal and vertical resolutions.

Since we're going to add a few other parameters, let's pick a better, more
precise name for these values.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Maxime Ripard and committed by
Mauro Carvalho Chehab
dba13a0b 8f57c2f8

+13 -13
+13 -13
drivers/media/i2c/ov5640.c
··· 168 168 struct ov5640_mode_info { 169 169 enum ov5640_mode_id id; 170 170 enum ov5640_downsize_mode dn_mode; 171 - u32 width; 172 - u32 height; 171 + u32 hact; 172 + u32 vact; 173 173 const struct reg_value *reg_data; 174 174 u32 reg_data_size; 175 175 }; ··· 1394 1394 if (!mode->reg_data) 1395 1395 continue; 1396 1396 1397 - if ((nearest && mode->width <= width && 1398 - mode->height <= height) || 1399 - (!nearest && mode->width == width && 1400 - mode->height == height)) 1397 + if ((nearest && mode->hact <= width && 1398 + mode->vact <= height) || 1399 + (!nearest && mode->hact == width && 1400 + mode->vact == height)) 1401 1401 break; 1402 1402 } 1403 1403 ··· 1886 1886 mode = ov5640_find_mode(sensor, fr, fmt->width, fmt->height, true); 1887 1887 if (!mode) 1888 1888 return -EINVAL; 1889 - fmt->width = mode->width; 1890 - fmt->height = mode->height; 1889 + fmt->width = mode->hact; 1890 + fmt->height = mode->vact; 1891 1891 1892 1892 if (new_mode) 1893 1893 *new_mode = mode; ··· 2354 2354 return -EINVAL; 2355 2355 2356 2356 fse->min_width = 2357 - ov5640_mode_data[0][fse->index].width; 2357 + ov5640_mode_data[0][fse->index].hact; 2358 2358 fse->max_width = fse->min_width; 2359 2359 fse->min_height = 2360 - ov5640_mode_data[0][fse->index].height; 2360 + ov5640_mode_data[0][fse->index].vact; 2361 2361 fse->max_height = fse->min_height; 2362 2362 2363 2363 return 0; ··· 2421 2421 mode = sensor->current_mode; 2422 2422 2423 2423 frame_rate = ov5640_try_frame_interval(sensor, &fi->interval, 2424 - mode->width, mode->height); 2424 + mode->hact, mode->vact); 2425 2425 if (frame_rate < 0) 2426 2426 frame_rate = OV5640_15_FPS; 2427 2427 2428 2428 sensor->current_fr = frame_rate; 2429 2429 sensor->frame_interval = fi->interval; 2430 - sensor->current_mode = ov5640_find_mode(sensor, frame_rate, mode->width, 2431 - mode->height, true); 2430 + sensor->current_mode = ov5640_find_mode(sensor, frame_rate, mode->hact, 2431 + mode->vact, true); 2432 2432 sensor->pending_mode_change = true; 2433 2433 out: 2434 2434 mutex_unlock(&sensor->lock);