]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV
authorRandy Dunlap <rdunlap@infradead.org>
Sat, 16 Aug 2014 00:15:53 +0000 (21:15 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 21 Aug 2014 20:25:38 +0000 (15:25 -0500)
Fix build when CONFIG_INPUT_EVDEV=m and DVB_AV7110=y.
Only build av7110_ir.c when CONFIG_INPUT_EVDEV is compatible with
CONFIG_DVB_AV7110.

Fixes these build errors:

drivers/built-in.o: In function `input_sync':
av7110_ir.c:(.text+0x1223ac): undefined reference to `input_event'
drivers/built-in.o: In function `av7110_emit_key':
av7110_ir.c:(.text+0x12247c): undefined reference to `input_event'
av7110_ir.c:(.text+0x122495): undefined reference to `input_event'
av7110_ir.c:(.text+0x122569): undefined reference to `input_event'
av7110_ir.c:(.text+0x1225a7): undefined reference to `input_event'
drivers/built-in.o:av7110_ir.c:(.text+0x122629): more undefined
references to `input_event' follow
drivers/built-in.o: In function `av7110_ir_init':
(.text+0x1227e4): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `av7110_ir_init':
(.text+0x12298f): undefined reference to `input_register_device'
drivers/built-in.o: In function `av7110_ir_init':
(.text+0x12299e): undefined reference to `input_free_device'
drivers/built-in.o: In function `av7110_ir_exit':
(.text+0x122a94): undefined reference to `input_unregister_device'

drivers/built-in.o: In function `av7110_detach':
av7110.c:(.text+0x228d4a): undefined reference to `av7110_ir_exit'
drivers/built-in.o: In function `arm_thread':
av7110.c:(.text+0x22a404): undefined reference to `av7110_check_ir_config'
av7110.c:(.text+0x22a626): undefined reference to `av7110_check_ir_config'
drivers/built-in.o: In function `av7110_attach':
av7110.c:(.text+0x22b08c): undefined reference to `av7110_ir_init'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Jim Davis <jim.epost@gmail.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/pci/ttpci/Kconfig
drivers/media/pci/ttpci/Makefile
drivers/media/pci/ttpci/av7110.c

index 0dcb8cd7767698d101860c111f65751c3951461e..7b83151ed6c48dd665a021c43438e61b453f2cce 100644 (file)
@@ -1,8 +1,12 @@
+config DVB_AV7110_IR
+       bool
+
 config DVB_AV7110
        tristate "AV7110 cards"
        depends on DVB_CORE && PCI && I2C
        select TTPCI_EEPROM
        select VIDEO_SAA7146_VV
+       select DVB_AV7110_IR if INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110
        depends on VIDEO_DEV    # dependencies of VIDEO_SAA7146_VV
        select DVB_VES1820 if MEDIA_SUBDRV_AUTOSELECT
        select DVB_VES1X93 if MEDIA_SUBDRV_AUTOSELECT
index 98905963ff085c0b0e265b7bf26ae0d892aa6a83..49f71b1eaf14b529689f82e658d44a09b285ddbf 100644 (file)
@@ -5,7 +5,7 @@
 
 dvb-ttpci-objs := av7110_hw.o av7110_v4l.o av7110_av.o av7110_ca.o av7110.o av7110_ipack.o
 
-ifdef CONFIG_INPUT_EVDEV
+ifdef CONFIG_DVB_AV7110_IR
 dvb-ttpci-objs += av7110_ir.o
 endif
 
index f38329d29daa8c41a83823deb0d2f87de7a079ff..c1f0617a69733df52b924668457a955ab39806f1 100644 (file)
@@ -235,7 +235,7 @@ static void recover_arm(struct av7110 *av7110)
 
        restart_feeds(av7110);
 
-#if IS_ENABLED(CONFIG_INPUT_EVDEV)
+#if IS_ENABLED(CONFIG_DVB_AV7110_IR)
        av7110_check_ir_config(av7110, true);
 #endif
 }
@@ -268,7 +268,7 @@ static int arm_thread(void *data)
                if (!av7110->arm_ready)
                        continue;
 
-#if IS_ENABLED(CONFIG_INPUT_EVDEV)
+#if IS_ENABLED(CONFIG_DVB_AV7110_IR)
                av7110_check_ir_config(av7110, false);
 #endif
 
@@ -2725,7 +2725,7 @@ static int av7110_attach(struct saa7146_dev* dev,
 
        mutex_init(&av7110->ioctl_mutex);
 
-#if IS_ENABLED(CONFIG_INPUT_EVDEV)
+#if IS_ENABLED(CONFIG_DVB_AV7110_IR)
        av7110_ir_init(av7110);
 #endif
        printk(KERN_INFO "dvb-ttpci: found av7110-%d.\n", av7110_num);
@@ -2768,7 +2768,7 @@ static int av7110_detach(struct saa7146_dev* saa)
        struct av7110 *av7110 = saa->ext_priv;
        dprintk(4, "%p\n", av7110);
 
-#if IS_ENABLED(CONFIG_INPUT_EVDEV)
+#if IS_ENABLED(CONFIG_DVB_AV7110_IR)
        av7110_ir_exit(av7110);
 #endif
        if (budgetpatch || av7110->full_ts) {