From 420d5b23a78a8b19bd8d52dd0cf76ed01da5f07e Mon Sep 17 00:00:00 2001
From: Jacopo Mondi <jacopo@jmondi.org>
Date: Tue, 14 Jul 2020 09:02:09 +0200
Subject: libcamera: ipu3: cio2: Add a const sensor() method
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add a const version of the CIO2Device::sensor() method, that retrieves
a const pointer to the sensor_ class member, to be called by users
which only own a const reference to a CIO2Device class instance.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/pipeline/ipu3/cio2.h | 1 +
 1 file changed, 1 insertion(+)

(limited to 'src')

diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h
index 221cf817..fa813a98 100644
--- a/src/libcamera/pipeline/ipu3/cio2.h
+++ b/src/libcamera/pipeline/ipu3/cio2.h
@@ -50,6 +50,7 @@ public:
 	int stop();
 
 	CameraSensor *sensor() { return sensor_; }
+	const CameraSensor *sensor() const { return sensor_; }
 
 	int queueBuffer(Request *request, FrameBuffer *rawBuffer);
 	void tryReturnBuffer(FrameBuffer *buffer);
-- 
cgit v1.2.1