diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2025-04-07 22:51:19 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2025-04-10 19:33:37 +0300 |
commit | bc29c7512fff1770c98fc369228bd56541df2791 (patch) | |
tree | 411f928d4664aaa778fbca102c7e0235dcc6ee47 /yavta.c | |
parent | 17e2b9980a46c19259fd7b341cf869c45e9015c3 (diff) |
Constify various global variables
Multiple global variables are not meant to be modified. Make the const.
While at it, drop an incorrect description of a section header.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Diffstat (limited to 'yavta.c')
-rw-r--r-- | yavta.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -185,7 +185,7 @@ static int pause_init(void) } /* ----------------------------------------------------------------------------- - * Pause Handling + * Format handling */ static bool video_is_mplane(struct device *dev) @@ -214,7 +214,7 @@ static bool video_is_output(struct device *dev) dev->type == V4L2_BUF_TYPE_META_OUTPUT; } -static struct { +static const struct { enum v4l2_buf_type type; bool supported; const char *name; @@ -261,7 +261,7 @@ static const char *v4l2_buf_type_name(enum v4l2_buf_type type) return "Unknown"; } -static struct v4l2_format_info { +static const struct v4l2_format_info { const char *name; unsigned int fourcc; unsigned char n_planes; @@ -449,6 +449,10 @@ static const char *v4l2_field_name(enum v4l2_field field) return "unknown"; } +/* ----------------------------------------------------------------------------- + * + */ + static void video_set_buf_type(struct device *dev, enum v4l2_buf_type type) { dev->type = type; @@ -2329,7 +2333,7 @@ static void usage(const char *argv0) #define OPT_DATA_PREFIX 271 #define OPT_RESET_CONTROLS 272 -static struct option opts[] = { +static const struct option opts[] = { {"buffer-size", 1, 0, OPT_BUFFER_SIZE}, {"buffer-type", 1, 0, 'B'}, {"capture", 2, 0, 'c'}, |