aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/usbvision
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-10-19 17:54:26 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-21 12:31:37 -0400
commitc6330fb86fd0fed98b7e0d5792881a77b778fefc (patch)
tree3c87d6fa7053963cfdea592a2956b28354ce0832 /drivers/media/video/usbvision
parent323a491a29d0bb1e91263ca347cb42c4de28adfc (diff)
V4L/DVB (9327): v4l: use video_device.num instead of minor in video%d
The kernel number of a v4l2 node (e.g. videoX, radioX or vbiX) is now independent of the minor number. So instead of using the minor field of the video_device struct one has to use the num field: this always contains the kernel number of the device node. I forgot about this when I did the v4l2 core change, so this patch converts all drivers that use it in one go. Luckily the change is trivial. Cc: michael@mihu.de Cc: mchehab@infradead.org Cc: corbet@lwn.net Cc: luca.risolia@studio.unibo.it Cc: isely@pobox.com Cc: pe1rxq@amsat.org Cc: royale@zerezo.com Cc: mkrufky@linuxtv.org Cc: stoth@linuxtv.org Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/usbvision')
-rw-r--r--drivers/media/video/usbvision/usbvision-i2c.c2
-rw-r--r--drivers/media/video/usbvision/usbvision-video.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/video/usbvision/usbvision-i2c.c
index 92427fdc1459..9907b9aff2b9 100644
--- a/drivers/media/video/usbvision/usbvision-i2c.c
+++ b/drivers/media/video/usbvision/usbvision-i2c.c
@@ -236,7 +236,7 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision)
236 sizeof(struct i2c_client)); 236 sizeof(struct i2c_client));
237 237
238 sprintf(usbvision->i2c_adap.name + strlen(usbvision->i2c_adap.name), 238 sprintf(usbvision->i2c_adap.name + strlen(usbvision->i2c_adap.name),
239 " #%d", usbvision->vdev->minor & 0x1f); 239 " #%d", usbvision->vdev->num);
240 PDEBUG(DBG_I2C,"Adaptername: %s", usbvision->i2c_adap.name); 240 PDEBUG(DBG_I2C,"Adaptername: %s", usbvision->i2c_adap.name);
241 usbvision->i2c_adap.dev.parent = &usbvision->dev->dev; 241 usbvision->i2c_adap.dev.parent = &usbvision->dev->dev;
242 242
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index 77aeb39b2750..d185b57fdcd0 100644
--- a/drivers/media/video/usbvision/usbvision-video.c
+++ b/drivers/media/video/usbvision/usbvision-video.c
@@ -1440,7 +1440,7 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
1440 // vbi Device: 1440 // vbi Device:
1441 if (usbvision->vbi) { 1441 if (usbvision->vbi) {
1442 PDEBUG(DBG_PROBE, "unregister /dev/vbi%d [v4l2]", 1442 PDEBUG(DBG_PROBE, "unregister /dev/vbi%d [v4l2]",
1443 usbvision->vbi->minor & 0x1f); 1443 usbvision->vbi->num);
1444 if (usbvision->vbi->minor != -1) { 1444 if (usbvision->vbi->minor != -1) {
1445 video_unregister_device(usbvision->vbi); 1445 video_unregister_device(usbvision->vbi);
1446 } else { 1446 } else {
@@ -1452,7 +1452,7 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
1452 // Radio Device: 1452 // Radio Device:
1453 if (usbvision->rdev) { 1453 if (usbvision->rdev) {
1454 PDEBUG(DBG_PROBE, "unregister /dev/radio%d [v4l2]", 1454 PDEBUG(DBG_PROBE, "unregister /dev/radio%d [v4l2]",
1455 usbvision->rdev->minor & 0x1f); 1455 usbvision->rdev->num);
1456 if (usbvision->rdev->minor != -1) { 1456 if (usbvision->rdev->minor != -1) {
1457 video_unregister_device(usbvision->rdev); 1457 video_unregister_device(usbvision->rdev);
1458 } else { 1458 } else {
@@ -1464,7 +1464,7 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
1464 // Video Device: 1464 // Video Device:
1465 if (usbvision->vdev) { 1465 if (usbvision->vdev) {
1466 PDEBUG(DBG_PROBE, "unregister /dev/video%d [v4l2]", 1466 PDEBUG(DBG_PROBE, "unregister /dev/video%d [v4l2]",
1467 usbvision->vdev->minor & 0x1f); 1467 usbvision->vdev->num);
1468 if (usbvision->vdev->minor != -1) { 1468 if (usbvision->vdev->minor != -1) {
1469 video_unregister_device(usbvision->vdev); 1469 video_unregister_device(usbvision->vdev);
1470 } else { 1470 } else {
@@ -1490,7 +1490,7 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
1490 goto err_exit; 1490 goto err_exit;
1491 } 1491 }
1492 printk(KERN_INFO "USBVision[%d]: registered USBVision Video device /dev/video%d [v4l2]\n", 1492 printk(KERN_INFO "USBVision[%d]: registered USBVision Video device /dev/video%d [v4l2]\n",
1493 usbvision->nr,usbvision->vdev->minor & 0x1f); 1493 usbvision->nr, usbvision->vdev->num);
1494 1494
1495 // Radio Device: 1495 // Radio Device:
1496 if (usbvision_device_data[usbvision->DevModel].Radio) { 1496 if (usbvision_device_data[usbvision->DevModel].Radio) {
@@ -1507,7 +1507,7 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
1507 goto err_exit; 1507 goto err_exit;
1508 } 1508 }
1509 printk(KERN_INFO "USBVision[%d]: registered USBVision Radio device /dev/radio%d [v4l2]\n", 1509 printk(KERN_INFO "USBVision[%d]: registered USBVision Radio device /dev/radio%d [v4l2]\n",
1510 usbvision->nr, usbvision->rdev->minor & 0x1f); 1510 usbvision->nr, usbvision->rdev->num);
1511 } 1511 }
1512 // vbi Device: 1512 // vbi Device:
1513 if (usbvision_device_data[usbvision->DevModel].vbi) { 1513 if (usbvision_device_data[usbvision->DevModel].vbi) {
@@ -1523,7 +1523,7 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
1523 goto err_exit; 1523 goto err_exit;
1524 } 1524 }
1525 printk(KERN_INFO "USBVision[%d]: registered USBVision VBI device /dev/vbi%d [v4l2] (Not Working Yet!)\n", 1525 printk(KERN_INFO "USBVision[%d]: registered USBVision VBI device /dev/vbi%d [v4l2] (Not Working Yet!)\n",
1526 usbvision->nr,usbvision->vbi->minor & 0x1f); 1526 usbvision->nr, usbvision->vbi->num);
1527 } 1527 }
1528 // all done 1528 // all done
1529 return 0; 1529 return 0;