summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/ipu3/cio2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/pipeline/ipu3/cio2.cpp')
-rw-r--r--src/libcamera/pipeline/ipu3/cio2.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/libcamera/pipeline/ipu3/cio2.cpp b/src/libcamera/pipeline/ipu3/cio2.cpp
index 821715e3..bd5260d5 100644
--- a/src/libcamera/pipeline/ipu3/cio2.cpp
+++ b/src/libcamera/pipeline/ipu3/cio2.cpp
@@ -33,16 +33,9 @@ const std::map<uint32_t, PixelFormat> mbusCodesToPixelFormat = {
} /* namespace */
CIO2Device::CIO2Device()
- : sensor_(nullptr), csi2_(nullptr)
{
}
-CIO2Device::~CIO2Device()
-{
- delete csi2_;
- delete sensor_;
-}
-
/**
* \brief Retrieve the list of supported PixelFormats
*
@@ -117,7 +110,7 @@ int CIO2Device::init(const MediaDevice *media, unsigned int index)
MediaLink *link = links[0];
MediaEntity *sensorEntity = link->source()->entity();
- sensor_ = new CameraSensor(sensorEntity);
+ sensor_ = std::make_unique<CameraSensor>(sensorEntity);
ret = sensor_->init();
if (ret)
return ret;
@@ -148,7 +141,7 @@ int CIO2Device::init(const MediaDevice *media, unsigned int index)
* might impact on power consumption.
*/
- csi2_ = new V4L2Subdevice(csi2Entity);
+ csi2_ = std::make_unique<V4L2Subdevice>(csi2Entity);
ret = csi2_->open();
if (ret)
return ret;