diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-09-23 18:20:59 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-09-27 11:47:23 +0300 |
commit | 10939357c4cc178d4a8628a728cb33f70b3d4edd (patch) | |
tree | b4e16fa27c1b6e4efc5e31f1532318c2975b6d3e /drivers/media/test-drivers/vivid/vivid-core.c | |
parent | 06016a67c61675642c71358c2afe6ce99b5d1468 (diff) | |
download | linux-10939357c4cc178d4a8628a728cb33f70b3d4edd.tar.xz |
media: vivid: use VIVID_MODULE_NAME to fill bus_info
Fixes this compiler warning:
drivers/media/test-drivers/vivid/vivid-core.c: In function 'vidioc_querycap':
drivers/media/test-drivers/vivid/vivid-core.c:243:35: warning: '%s' directive output may be truncated writing up to 35 bytes into a region of size 23 [-Wformat-truncation=]
243 | "platform:%s", dev->v4l2_dev.name);
| ^~
drivers/media/test-drivers/vivid/vivid-core.c:242:9: note: 'snprintf' output between 10 and 45 bytes into a destination of size 32
242 | snprintf(cap->bus_info, sizeof(cap->bus_info),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
243 | "platform:%s", dev->v4l2_dev.name);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/test-drivers/vivid/vivid-core.c')
-rw-r--r-- | drivers/media/test-drivers/vivid/vivid-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/test-drivers/vivid/vivid-core.c b/drivers/media/test-drivers/vivid/vivid-core.c index e95bdccfc18e..394c9f81ea72 100644 --- a/drivers/media/test-drivers/vivid/vivid-core.c +++ b/drivers/media/test-drivers/vivid/vivid-core.c @@ -240,7 +240,7 @@ static int vidioc_querycap(struct file *file, void *priv, strscpy(cap->driver, "vivid", sizeof(cap->driver)); strscpy(cap->card, "vivid", sizeof(cap->card)); snprintf(cap->bus_info, sizeof(cap->bus_info), - "platform:%s", dev->v4l2_dev.name); + "platform:%s-%03d", VIVID_MODULE_NAME, dev->inst); cap->capabilities = dev->vid_cap_caps | dev->vid_out_caps | dev->vbi_cap_caps | dev->vbi_out_caps | |