Archived
14
0
Fork 0

V4L/DVB (12789): tm6000: fix DVB dependency

Compilation were causing errors, if DVB_CORE weren't selected.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Mauro Carvalho Chehab 2007-08-25 08:35:31 -03:00 committed by Mauro Carvalho Chehab
parent 3169c9b26f
commit 5c0d0b21fd
3 changed files with 15 additions and 3 deletions

View file

@ -12,3 +12,9 @@ config VIDEO_TM6000
an external software decoder to watch TV on your computer.
Say Y if you own such a device and want to use it.
config VIDEO_TM6000_DVB
bool "DVB Support for tm6000 based TV cards"
depends on VIDEO_TM6000 && DVB_CORE
---help---
This adds support for DVB cards based on the tm5600/tm6000 chip.

View file

@ -1,10 +1,12 @@
tm6000-objs := tm6000-cards.o \
tm6000-core.o \
tm6000-i2c.o \
tm6000-video.o \
tm6000-dvb.o \
hack.o \
tm6000-video.o
ifeq ($(CONFIG_VIDEO_TM6000_DVB),y)
tm6000-objs := tm6000-dvb.o \
hack.o
endif
obj-$(CONFIG_VIDEO_TM6000) += tm6000.o

View file

@ -191,12 +191,14 @@ static int tm6000_init_dev(struct tm6000_core *dev)
rc = -ENOMEM;
goto err;
}
#ifdef CONFIG_VIDEO_TM6000_DVB
rc = tm6000_dvb_register(dev);
if(rc < 0) {
kfree(dev->dvb);
dev->dvb = NULL;
goto err;
}
#endif
}
err:
mutex_unlock(&dev->lock);
@ -401,10 +403,12 @@ static void tm6000_usb_disconnect(struct usb_interface *interface)
mutex_lock(&dev->lock);
#ifdef CONFIG_VIDEO_TM6000_DVB
if(dev->dvb) {
tm6000_dvb_unregister(dev);
kfree(dev->dvb);
}
#endif
tm6000_v4l2_unregister(dev);