tree: Run clang-format to conform to the kernel coding style

The coding style has been a bit erratic. Enforce the linux kernel coding
style by reusing their .clang-format file, running clang-format on the
source, and ignoring the few shortcomings that clang-format has at the
moment (especially on aligning the define values).

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
This commit is contained in:
Maxime Ripard
2018-07-16 22:02:38 +02:00
parent f831082a09
commit 5aeb07f8bf
28 changed files with 1066 additions and 386 deletions
+11 -10
View File
@@ -30,23 +30,24 @@
#define SOURCE_SIZE_MAX (1024 * 1024)
bool v4l2_find_format(int video_fd, unsigned int type,
unsigned int pixelformat);
unsigned int pixelformat);
int v4l2_set_format(int video_fd, unsigned int type, unsigned int pixelformat,
unsigned int width, unsigned int height);
unsigned int width, unsigned int height);
int v4l2_get_format(int video_fd, unsigned int type, unsigned int *width,
unsigned int *height, unsigned int *bytesperline, unsigned int *sizes,
unsigned int *planes_count);
unsigned int *height, unsigned int *bytesperline,
unsigned int *sizes, unsigned int *planes_count);
int v4l2_create_buffers(int video_fd, unsigned int type,
unsigned int buffers_count);
unsigned int buffers_count);
int v4l2_request_buffer(int video_fd, unsigned int type, unsigned int index,
unsigned int *lengths, unsigned int *offsets,
unsigned int buffers_count);
unsigned int *lengths, unsigned int *offsets,
unsigned int buffers_count);
int v4l2_queue_buffer(int video_fd, int request_fd, unsigned int type,
unsigned int index, unsigned int size, unsigned int buffers_count);
unsigned int index, unsigned int size,
unsigned int buffers_count);
int v4l2_dequeue_buffer(int video_fd, int request_fd, unsigned int type,
unsigned int index, unsigned int buffers_count);
unsigned int index, unsigned int buffers_count);
int v4l2_set_control(int video_fd, int request_fd, unsigned int id, void *data,
unsigned int size);
unsigned int size);
int v4l2_set_stream(int video_fd, unsigned int type, bool enable);
#endif