]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[media] cx23885: Bugfix /sys/class/video4linux/videoX/name truncation
authorSteven Toth <stoth@kernellabs.com>
Thu, 5 Jan 2012 00:13:26 +0000 (21:13 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 5 Jan 2012 08:54:30 +0000 (06:54 -0200)
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: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx23885/cx23885-417.c
drivers/media/video/cx23885/cx23885-video.c

index 3bc07a53d105d6d010aaf933c18f5fdf7b5c8213..f5c79e53e5a145bce2fc8a0f898ca7482d2ab0e6 100644 (file)
@@ -1733,8 +1733,8 @@ static struct video_device *cx23885_video_dev_alloc(
        if (NULL == vfd)
                return NULL;
        *vfd = *template;
-       snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", dev->name,
-               type, cx23885_boards[tsport->dev->board].name);
+       snprintf(vfd->name, sizeof(vfd->name), "%s (%s)",
+               cx23885_boards[tsport->dev->board].name, type);
        vfd->parent  = &pci->dev;
        vfd->release = video_device_release;
        return vfd;
index e85412daa6dc2a8ef8427de7841aaf9e4b54c154..a01cd11da40237c40ce5fac8aba4af26eb779d4f 100644 (file)
@@ -344,8 +344,8 @@ static struct video_device *cx23885_vdev_init(struct cx23885_dev *dev,
        *vfd = *template;
        vfd->v4l2_dev = &dev->v4l2_dev;
        vfd->release = video_device_release;
-       snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
-                dev->name, type, cx23885_boards[dev->board].name);
+       snprintf(vfd->name, sizeof(vfd->name), "%s (%s)",
+                cx23885_boards[dev->board].name, type);
        video_set_drvdata(vfd, dev);
        return vfd;
 }