[libcamera-devel,1/3] libcamera: v4l2_device: Fix LOG usage

Message ID 20190213122035.25309-2-kieran.bingham@ideasonboard.com
State Accepted
Commit 0a443b589bfac5b726c1beaef047e59a6f0b3841
Headers show
Series
  • Fix LOG usage
Related show

Commit Message

Kieran Bingham Feb. 13, 2019, 12:20 p.m. UTC
Add the V4L2 category to the LOG() statements.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/libcamera/v4l2_device.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index 683090abc8e5..d92e20b97d50 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -390,7 +390,7 @@  int V4L2Device::getFormatSingleplane(V4L2DeviceFormat *format)
 	ret = ioctl(fd_, VIDIOC_G_FMT, &v4l2Format);
 	if (ret) {
 		ret = -errno;
-		LOG(Error) << "Unable to get format: " << strerror(-ret);
+		LOG(V4L2, Error) << "Unable to get format: " << strerror(-ret);
 		return ret;
 	}
 
@@ -419,7 +419,7 @@  int V4L2Device::setFormatSingleplane(V4L2DeviceFormat *format)
 	ret = ioctl(fd_, VIDIOC_S_FMT, &v4l2Format);
 	if (ret) {
 		ret = -errno;
-		LOG(Error) << "Unable to set format: " << strerror(-ret);
+		LOG(V4L2, Error) << "Unable to set format: " << strerror(-ret);
 		return ret;
 	}
 
@@ -447,7 +447,7 @@  int V4L2Device::getFormatMultiplane(V4L2DeviceFormat *format)
 	ret = ioctl(fd_, VIDIOC_G_FMT, &v4l2Format);
 	if (ret) {
 		ret = -errno;
-		LOG(Error) << "Unable to get format: " << strerror(-ret);
+		LOG(V4L2, Error) << "Unable to get format: " << strerror(-ret);
 		return ret;
 	}
 
@@ -484,7 +484,7 @@  int V4L2Device::setFormatMultiplane(V4L2DeviceFormat *format)
 	ret = ioctl(fd_, VIDIOC_S_FMT, &v4l2Format);
 	if (ret) {
 		ret = -errno;
-		LOG(Error) << "Unable to set format: " << strerror(-ret);
+		LOG(V4L2, Error) << "Unable to set format: " << strerror(-ret);
 		return ret;
 	}