mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 17:24:17 +08:00
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:
parent
102e781364
commit
a79b11c025
@ -946,17 +946,14 @@ static int __devinit ivtv_probe(struct pci_dev *pdev,
|
||||
if (itv == NULL)
|
||||
return -ENOMEM;
|
||||
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);
|
||||
if (retval) {
|
||||
kfree(itv);
|
||||
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_process_options(itv);
|
||||
|
Loading…
Reference in New Issue
Block a user