V4L/DVB (11672): ivtv: use v4l2_device_set_name.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
102e781364
commit
a79b11c025
@@ -946,17 +946,14 @@ static int __devinit ivtv_probe(struct pci_dev *pdev,
|
|||||||
if (itv == NULL)
|
if (itv == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
itv->pdev = pdev;
|
itv->pdev = pdev;
|
||||||
itv->instance = atomic_inc_return(&ivtv_instance) - 1;
|
itv->instance = v4l2_device_set_name(&itv->v4l2_dev, "ivtv",
|
||||||
|
&ivtv_instance);
|
||||||
|
|
||||||
retval = v4l2_device_register(&pdev->dev, &itv->v4l2_dev);
|
retval = v4l2_device_register(&pdev->dev, &itv->v4l2_dev);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
kfree(itv);
|
kfree(itv);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
/* "ivtv + PCI ID" is a bit of a mouthful, so use
|
|
||||||
"ivtv + instance" instead. */
|
|
||||||
snprintf(itv->v4l2_dev.name, sizeof(itv->v4l2_dev.name),
|
|
||||||
"ivtv%d", itv->instance);
|
|
||||||
IVTV_INFO("Initializing card %d\n", itv->instance);
|
IVTV_INFO("Initializing card %d\n", itv->instance);
|
||||||
|
|
||||||
ivtv_process_options(itv);
|
ivtv_process_options(itv);
|
||||||
|
Reference in New Issue
Block a user