diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-09-23 17:21:05 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-09-27 10:47:23 +0200 |
commit | b74093bfbcada7c45ea7425118cd8ee57314162d (patch) | |
tree | ba3458f24371ecbc874904d26944a8bb51b0355e /drivers/media/radio/radio-miropcm20.c | |
parent | media: radio-isa: use dev_name to fill in bus_info (diff) | |
download | linux-b74093bfbcada7c45ea7425118cd8ee57314162d.tar.xz linux-b74093bfbcada7c45ea7425118cd8ee57314162d.zip |
media: radio-miropcm20: set bus_info to explicit name
Fill in bus_info with fixed name.
This fixes this compiler warning:
drivers/media/radio/radio-miropcm20.c: In function 'vidioc_querycap':
drivers/media/radio/radio-miropcm20.c:206:57: warning: '%s' directive output may be truncated writing up to 35 bytes into a region of size 28 [-Wformat-truncation=]
206 | snprintf(v->bus_info, sizeof(v->bus_info), "ISA:%s", dev->v4l2_dev.name);
| ^~
drivers/media/radio/radio-miropcm20.c:206:9: note: 'snprintf' output between 5 and 40 bytes into a destination of size 32
206 | snprintf(v->bus_info, sizeof(v->bus_info), "ISA:%s", dev->v4l2_dev.name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/radio/radio-miropcm20.c')
-rw-r--r-- | drivers/media/radio/radio-miropcm20.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/radio/radio-miropcm20.c b/drivers/media/radio/radio-miropcm20.c index 99788834c646..08be77b8f3b7 100644 --- a/drivers/media/radio/radio-miropcm20.c +++ b/drivers/media/radio/radio-miropcm20.c @@ -199,11 +199,9 @@ static int pcm20_setfreq(struct pcm20 *dev, unsigned long freq) static int vidioc_querycap(struct file *file, void *priv, struct v4l2_capability *v) { - struct pcm20 *dev = video_drvdata(file); - strscpy(v->driver, "Miro PCM20", sizeof(v->driver)); strscpy(v->card, "Miro PCM20", sizeof(v->card)); - snprintf(v->bus_info, sizeof(v->bus_info), "ISA:%s", dev->v4l2_dev.name); + strscpy(v->bus_info, "ISA:radio-miropcm20", sizeof(v->bus_info)); return 0; } |