media: v4l2-device.h: drop V4L2_DEVICE_NAME_SIZE
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 23 Sep 2023 15:20:58 +0000 (17:20 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 27 Sep 2023 08:47:23 +0000 (10:47 +0200)
Don't use defines for the size of a name field, everyone
should just use sizeof(). In this case it was never used,
but it is bad practice, so just drop it.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
include/media/v4l2-device.h

index 8a8977a33ec107399771b17600b9bc47bd9a9ddd..f6f111fae33c0d528e2154d48cdab7fb3836e2a3 100644 (file)
@@ -13,8 +13,6 @@
 #include <media/v4l2-subdev.h>
 #include <media/v4l2-dev.h>
 
-#define V4L2_DEVICE_NAME_SIZE (20 + 16)
-
 struct v4l2_ctrl_handler;
 
 /**
@@ -49,7 +47,7 @@ struct v4l2_device {
        struct media_device *mdev;
        struct list_head subdevs;
        spinlock_t lock;
-       char name[V4L2_DEVICE_NAME_SIZE];
+       char name[36];
        void (*notify)(struct v4l2_subdev *sd,
                        unsigned int notification, void *arg);
        struct v4l2_ctrl_handler *ctrl_handler;