diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2007-01-27 19:13:06 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:35:09 -0500 |
commit | 7857735b3a6695a90fa3c8808bf96385ac5a95dc (patch) | |
tree | 487605dbc252433c49eca682f9e4a51dee807f6d | |
parent | 357a268d59411b84fde712400585dd118c61467f (diff) |
V4L/DVB (5158): Dvb-ttpci: Fixed unregistering the vbi device
Fixed unregistering the vbi device for cards without analog tuner.
Thanks to Marco Schluessler <marco@lordzodiac.de> for pointing out this bug.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.h | 1 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_v4l.c | 9 |
2 files changed, 2 insertions, 8 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.h b/drivers/media/dvb/ttpci/av7110.h index 9c79696da08a..1d05166bd853 100644 --- a/drivers/media/dvb/ttpci/av7110.h +++ b/drivers/media/dvb/ttpci/av7110.h | |||
@@ -35,7 +35,6 @@ | |||
35 | 35 | ||
36 | #define ANALOG_TUNER_VES1820 1 | 36 | #define ANALOG_TUNER_VES1820 1 |
37 | #define ANALOG_TUNER_STV0297 2 | 37 | #define ANALOG_TUNER_STV0297 2 |
38 | #define ANALOG_TUNER_VBI 0x100 | ||
39 | 38 | ||
40 | extern int av7110_debug; | 39 | extern int av7110_debug; |
41 | 40 | ||
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c index dbfd5e7b4be0..78a15d52b056 100644 --- a/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/drivers/media/dvb/ttpci/av7110_v4l.c | |||
@@ -817,20 +817,15 @@ int av7110_init_v4l(struct av7110 *av7110) | |||
817 | saa7146_vv_release(dev); | 817 | saa7146_vv_release(dev); |
818 | return -ENODEV; | 818 | return -ENODEV; |
819 | } | 819 | } |
820 | if (saa7146_register_device(&av7110->vbi_dev, dev, "av7110", VFL_TYPE_VBI)) { | 820 | if (saa7146_register_device(&av7110->vbi_dev, dev, "av7110", VFL_TYPE_VBI)) |
821 | ERR(("cannot register vbi v4l2 device. skipping.\n")); | 821 | ERR(("cannot register vbi v4l2 device. skipping.\n")); |
822 | } else { | ||
823 | if (av7110->analog_tuner_flags) | ||
824 | av7110->analog_tuner_flags |= ANALOG_TUNER_VBI; | ||
825 | } | ||
826 | return 0; | 822 | return 0; |
827 | } | 823 | } |
828 | 824 | ||
829 | int av7110_exit_v4l(struct av7110 *av7110) | 825 | int av7110_exit_v4l(struct av7110 *av7110) |
830 | { | 826 | { |
831 | saa7146_unregister_device(&av7110->v4l_dev, av7110->dev); | 827 | saa7146_unregister_device(&av7110->v4l_dev, av7110->dev); |
832 | if (av7110->analog_tuner_flags & ANALOG_TUNER_VBI) | 828 | saa7146_unregister_device(&av7110->vbi_dev, av7110->dev); |
833 | saa7146_unregister_device(&av7110->vbi_dev, av7110->dev); | ||
834 | return 0; | 829 | return 0; |
835 | } | 830 | } |
836 | 831 | ||