From d41e0585e972c1350d55679e61e0b91368bb61f9 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 26 Feb 2024 13:27:39 +0200 Subject: libcamera: v4l2_subdevice: Rename V4L2SubdeviceFormat::mbus_code to code The V4L2SubdeviceFormat::mbus_code member doesn't follow the libcamera coding style as it should use camelCase. Fix it by renaming it to just 'code', to shorten lines in addition to fixing the coding style. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- src/libcamera/camera_sensor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libcamera/camera_sensor.cpp') diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index 55c9c74b..af5d97f3 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -770,7 +770,7 @@ V4L2SubdeviceFormat CameraSensor::getFormat(const std::vector &mbu } V4L2SubdeviceFormat format{ - .mbus_code = bestCode, + .code = bestCode, .size = *bestSize, .colorSpace = ColorSpace::Raw, }; @@ -892,12 +892,12 @@ int CameraSensor::applyConfiguration(const SensorConfiguration &config, size.height != config.outputSize.height) continue; - subdevFormat.mbus_code = code; + subdevFormat.code = code; subdevFormat.size = size; break; } } - if (!subdevFormat.mbus_code) { + if (!subdevFormat.code) { LOG(CameraSensor, Error) << "Invalid output size in sensor configuration"; return -EINVAL; } @@ -1061,7 +1061,7 @@ int CameraSensor::sensorInfo(IPACameraSensorInfo *info) const if (ret) return ret; - info->bitsPerPixel = MediaBusFormatInfo::info(format.mbus_code).bitsPerPixel; + info->bitsPerPixel = MediaBusFormatInfo::info(format.code).bitsPerPixel; info->outputSize = format.size; std::optional cfa = properties_.get(properties::draft::ColorFilterArrangement); -- cgit v1.2.1