media: v4l2-core: constify the class struct
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 18 Oct 2024 13:13:51 +0000 (15:13 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Mon, 28 Oct 2024 14:35:56 +0000 (15:35 +0100)
All functions that take the class address as argument expect a const
pointer so we can make the video class constant.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/v4l2-core/v4l2-dev.c

index dbd6fba93179f4a6d12716e948f418274bc5dc07..5bcaeeba4d09f35b70bec06d2297105e634902a5 100644 (file)
@@ -229,7 +229,7 @@ static void v4l2_device_release(struct device *cd)
                v4l2_device_put(v4l2_dev);
 }
 
-static struct class video_class = {
+static const struct class video_class = {
        .name = VIDEO_NAME,
        .dev_groups = video_device_groups,
 };