mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 07:19:45 +03:00
v4l2: Convert to pragma once
Remove the verbose #ifndef/#define/#endif pattern for maintaining header idempotency, and replace it with a simple #pragma once. This simplifies the headers, and prevents redundant changes when header files get moved. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
This commit is contained in:
parent
7e125787ad
commit
796210ecea
4 changed files with 4 additions and 16 deletions
|
@ -5,8 +5,7 @@
|
||||||
* v4l2_camera.h - V4L2 compatibility camera
|
* v4l2_camera.h - V4L2 compatibility camera
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __V4L2_CAMERA_H__
|
#pragma once
|
||||||
#define __V4L2_CAMERA_H__
|
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
@ -86,5 +85,3 @@ private:
|
||||||
std::condition_variable bufferCV_;
|
std::condition_variable bufferCV_;
|
||||||
unsigned int bufferAvailableCount_;
|
unsigned int bufferAvailableCount_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __V4L2_CAMERA_H__ */
|
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
* v4l2_camera_file.h - V4L2 compatibility camera file information
|
* v4l2_camera_file.h - V4L2 compatibility camera file information
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __V4L2_CAMERA_FILE_H__
|
#pragma once
|
||||||
#define __V4L2_CAMERA_FILE_H__
|
|
||||||
|
|
||||||
#include <linux/videodev2.h>
|
#include <linux/videodev2.h>
|
||||||
|
|
||||||
|
@ -33,5 +32,3 @@ private:
|
||||||
int efd_;
|
int efd_;
|
||||||
enum v4l2_priority priority_;
|
enum v4l2_priority priority_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __V4L2_CAMERA_FILE_H__ */
|
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
* v4l2_camera_proxy.h - Proxy to V4L2 compatibility camera
|
* v4l2_camera_proxy.h - Proxy to V4L2 compatibility camera
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __V4L2_CAMERA_PROXY_H__
|
#pragma once
|
||||||
#define __V4L2_CAMERA_PROXY_H__
|
|
||||||
|
|
||||||
#include <linux/videodev2.h>
|
#include <linux/videodev2.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -100,5 +99,3 @@ private:
|
||||||
/* This mutex is to serialize access to the proxy. */
|
/* This mutex is to serialize access to the proxy. */
|
||||||
libcamera::Mutex proxyMutex_;
|
libcamera::Mutex proxyMutex_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __V4L2_CAMERA_PROXY_H__ */
|
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
* v4l2_compat_manager.h - V4L2 compatibility manager
|
* v4l2_compat_manager.h - V4L2 compatibility manager
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __V4L2_COMPAT_MANAGER_H__
|
#pragma once
|
||||||
#define __V4L2_COMPAT_MANAGER_H__
|
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -68,5 +67,3 @@ private:
|
||||||
std::map<int, std::shared_ptr<V4L2CameraFile>> files_;
|
std::map<int, std::shared_ptr<V4L2CameraFile>> files_;
|
||||||
std::map<void *, V4L2CameraProxy *> mmaps_;
|
std::map<void *, V4L2CameraProxy *> mmaps_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __V4L2_COMPAT_MANAGER_H__ */
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue