aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-10-17 15:59:01 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-17 15:59:01 -0400
commitfdd1eeb49d36fa79505f96de0f68e8d6768ab0b0 (patch)
treec9bd13d5cfd6ef0701752be40405962f4d1c507e /drivers/media/common
parent2c76a12ae9f5e6e2afc400bfbdd8b326e7d36b2a (diff)
[media] siano: allow compiling it without RC support
Remote controller support should be optional on all drivers. Make it optional at Siano's driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/Kconfig7
-rw-r--r--drivers/media/common/siano/Kconfig10
-rw-r--r--drivers/media/common/siano/Makefile3
-rw-r--r--drivers/media/common/siano/smsir.h9
4 files changed, 27 insertions, 2 deletions
diff --git a/drivers/media/common/Kconfig b/drivers/media/common/Kconfig
index 121b0110af3c..d2a436ce77f8 100644
--- a/drivers/media/common/Kconfig
+++ b/drivers/media/common/Kconfig
@@ -1,3 +1,10 @@
1# Used by common drivers, when they need to ask questions
2config MEDIA_COMMON_OPTIONS
3 bool
4
5comment "common driver options"
6 depends on MEDIA_COMMON_OPTIONS
7
1source "drivers/media/common/b2c2/Kconfig" 8source "drivers/media/common/b2c2/Kconfig"
2source "drivers/media/common/saa7146/Kconfig" 9source "drivers/media/common/saa7146/Kconfig"
3source "drivers/media/common/siano/Kconfig" 10source "drivers/media/common/siano/Kconfig"
diff --git a/drivers/media/common/siano/Kconfig b/drivers/media/common/siano/Kconfig
index 425aeadfb49d..08d5b58dc672 100644
--- a/drivers/media/common/siano/Kconfig
+++ b/drivers/media/common/siano/Kconfig
@@ -4,7 +4,7 @@
4 4
5config SMS_SIANO_MDTV 5config SMS_SIANO_MDTV
6 tristate 6 tristate
7 depends on DVB_CORE && RC_CORE && HAS_DMA 7 depends on DVB_CORE && HAS_DMA
8 depends on SMS_USB_DRV || SMS_SDIO_DRV 8 depends on SMS_USB_DRV || SMS_SDIO_DRV
9 default y 9 default y
10 ---help--- 10 ---help---
@@ -15,3 +15,11 @@ config SMS_SIANO_MDTV
15 15
16 Further documentation on this driver can be found on the WWW 16 Further documentation on this driver can be found on the WWW
17 at http://www.siano-ms.com/ 17 at http://www.siano-ms.com/
18config SMS_SIANO_RC
19 bool "Enable Remote Controller support for Siano devices"
20 depends on SMS_SIANO_MDTV && RC_CORE
21 depends on SMS_USB_DRV || SMS_SDIO_DRV
22 depends on MEDIA_COMMON_OPTIONS
23 default y
24 ---help---
25 Choose Y to select Remote Controller support for Siano driver.
diff --git a/drivers/media/common/siano/Makefile b/drivers/media/common/siano/Makefile
index 2a09279e0648..0e6f5e927137 100644
--- a/drivers/media/common/siano/Makefile
+++ b/drivers/media/common/siano/Makefile
@@ -1,6 +1,7 @@
1smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o 1smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o
2 2
3obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o 3obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o
4obj-$(CONFIG_SMS_SIANO_RC) += smsir.o
4 5
5ccflags-y += -Idrivers/media/dvb-core 6ccflags-y += -Idrivers/media/dvb-core
6ccflags-y += $(extra-cflags-y) $(extra-cflags-m) 7ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
diff --git a/drivers/media/common/siano/smsir.h b/drivers/media/common/siano/smsir.h
index ae92b3a8587e..69b59b9eee28 100644
--- a/drivers/media/common/siano/smsir.h
+++ b/drivers/media/common/siano/smsir.h
@@ -46,10 +46,19 @@ struct ir_t {
46 u32 controller; 46 u32 controller;
47}; 47};
48 48
49#ifdef CONFIG_SMS_SIANO_RC
49int sms_ir_init(struct smscore_device_t *coredev); 50int sms_ir_init(struct smscore_device_t *coredev);
50void sms_ir_exit(struct smscore_device_t *coredev); 51void sms_ir_exit(struct smscore_device_t *coredev);
51void sms_ir_event(struct smscore_device_t *coredev, 52void sms_ir_event(struct smscore_device_t *coredev,
52 const char *buf, int len); 53 const char *buf, int len);
54#else
55inline static int sms_ir_init(struct smscore_device_t *coredev) {
56 return 0;
57}
58inline static void sms_ir_exit(struct smscore_device_t *coredev) {};
59inline static void sms_ir_event(struct smscore_device_t *coredev,
60 const char *buf, int len) {};
61#endif
53 62
54#endif /* __SMS_IR_H__ */ 63#endif /* __SMS_IR_H__ */
55 64