diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-02 15:15:17 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-02 15:15:17 +0200 |
commit | 82be7998cf669df0155ca75ef1876c750cccbff9 (patch) | |
tree | 220079a200cfc4fa54c1197a16390c301b5ce247 /linux/drivers | |
parent | 79d2addf97397ee580b80f71343cf72b03da65a2 (diff) | |
download | mediapointer-dvb-s2-82be7998cf669df0155ca75ef1876c750cccbff9.tar.gz mediapointer-dvb-s2-82be7998cf669df0155ca75ef1876c750cccbff9.tar.bz2 |
ivtv: use v4l2_device_set_name.
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-driver.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c index d5bdcd372..edb81a948 100644 --- a/linux/drivers/media/video/ivtv/ivtv-driver.c +++ b/linux/drivers/media/video/ivtv/ivtv-driver.c @@ -950,17 +950,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); |