diff mbox

[v3,1/4] v4l: libv4lsubdev: Make mbus_formats array const

Message ID 1453725585-4165-2-git-send-email-sakari.ailus@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sakari Ailus Jan. 25, 2016, 12:39 p.m. UTC
The array is already static and may not be modified at runtime. Make it
const.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 utils/media-ctl/libv4l2subdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart Jan. 25, 2016, 8:17 p.m. UTC | #1
Hi Sakari,

Thank you for the patch.

On Monday 25 January 2016 14:39:42 Sakari Ailus wrote:
> The array is already static and may not be modified at runtime. Make it
> const.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  utils/media-ctl/libv4l2subdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/media-ctl/libv4l2subdev.c
> b/utils/media-ctl/libv4l2subdev.c index dc2cd87..e45834f 100644
> --- a/utils/media-ctl/libv4l2subdev.c
> +++ b/utils/media-ctl/libv4l2subdev.c
> @@ -715,7 +715,7 @@ int v4l2_subdev_parse_setup_formats(struct media_device
> *media, const char *p) return *end ? -EINVAL : 0;
>  }
> 
> -static struct {
> +static const struct {
>  	const char *name;
>  	enum v4l2_mbus_pixelcode code;
>  } mbus_formats[] = {
diff mbox

Patch

diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
index dc2cd87..e45834f 100644
--- a/utils/media-ctl/libv4l2subdev.c
+++ b/utils/media-ctl/libv4l2subdev.c
@@ -715,7 +715,7 @@  int v4l2_subdev_parse_setup_formats(struct media_device *media, const char *p)
 	return *end ? -EINVAL : 0;
 }
 
-static struct {
+static const struct {
 	const char *name;
 	enum v4l2_mbus_pixelcode code;
 } mbus_formats[] = {