Commit 9def5ed7 authored by Steven Toth's avatar Steven Toth Committed by Mauro Carvalho Chehab

[media] cx23885: Bugfix /sys/class/video4linux/videoX/name truncation

The card names are being truncated in the video4linux sys class name file.
Prior to this patch they were shown as:
cx23885[0] mpeg (Hauppauge WinT
cx23885[0] video (Hauppauge WinT
cx23885[0] vbi (Hauppauge WinT

After this patch they are shown as:
Hauppauge WinTV-HVR1850 (video)
Hauppauge WinTV-HVR1850 (mpeg)
Hauppauge WinTV-HVR1850 (vbi)
Signed-off-by: default avatarSteven Toth <stoth@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 09b3bc22
...@@ -1733,8 +1733,8 @@ static struct video_device *cx23885_video_dev_alloc( ...@@ -1733,8 +1733,8 @@ static struct video_device *cx23885_video_dev_alloc(
if (NULL == vfd) if (NULL == vfd)
return NULL; return NULL;
*vfd = *template; *vfd = *template;
snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", dev->name, snprintf(vfd->name, sizeof(vfd->name), "%s (%s)",
type, cx23885_boards[tsport->dev->board].name); cx23885_boards[tsport->dev->board].name, type);
vfd->parent = &pci->dev; vfd->parent = &pci->dev;
vfd->release = video_device_release; vfd->release = video_device_release;
return vfd; return vfd;
......
...@@ -344,8 +344,8 @@ static struct video_device *cx23885_vdev_init(struct cx23885_dev *dev, ...@@ -344,8 +344,8 @@ static struct video_device *cx23885_vdev_init(struct cx23885_dev *dev,
*vfd = *template; *vfd = *template;
vfd->v4l2_dev = &dev->v4l2_dev; vfd->v4l2_dev = &dev->v4l2_dev;
vfd->release = video_device_release; vfd->release = video_device_release;
snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", snprintf(vfd->name, sizeof(vfd->name), "%s (%s)",
dev->name, type, cx23885_boards[dev->board].name); cx23885_boards[dev->board].name, type);
video_set_drvdata(vfd, dev); video_set_drvdata(vfd, dev);
return vfd; return vfd;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment