From fdd1eeb49d36fa79505f96de0f68e8d6768ab0b0 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 17 Oct 2012 16:59:01 -0300 Subject: [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 --- drivers/media/common/Kconfig | 7 +++++++ drivers/media/common/siano/Kconfig | 10 +++++++++- drivers/media/common/siano/Makefile | 3 ++- drivers/media/common/siano/smsir.h | 9 +++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) (limited to 'drivers/media/common') diff --git a/drivers/media/common/Kconfig b/drivers/media/common/Kconfig index 121b011..d2a436c 100644 --- a/drivers/media/common/Kconfig +++ b/drivers/media/common/Kconfig @@ -1,3 +1,10 @@ +# Used by common drivers, when they need to ask questions +config MEDIA_COMMON_OPTIONS + bool + +comment "common driver options" + depends on MEDIA_COMMON_OPTIONS + source "drivers/media/common/b2c2/Kconfig" source "drivers/media/common/saa7146/Kconfig" source "drivers/media/common/siano/Kconfig" diff --git a/drivers/media/common/siano/Kconfig b/drivers/media/common/siano/Kconfig index 425aead..08d5b58 100644 --- a/drivers/media/common/siano/Kconfig +++ b/drivers/media/common/siano/Kconfig @@ -4,7 +4,7 @@ config SMS_SIANO_MDTV tristate - depends on DVB_CORE && RC_CORE && HAS_DMA + depends on DVB_CORE && HAS_DMA depends on SMS_USB_DRV || SMS_SDIO_DRV default y ---help--- @@ -15,3 +15,11 @@ config SMS_SIANO_MDTV Further documentation on this driver can be found on the WWW at http://www.siano-ms.com/ +config SMS_SIANO_RC + bool "Enable Remote Controller support for Siano devices" + depends on SMS_SIANO_MDTV && RC_CORE + depends on SMS_USB_DRV || SMS_SDIO_DRV + depends on MEDIA_COMMON_OPTIONS + default y + ---help--- + 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 2a09279..0e6f5e9 100644 --- a/drivers/media/common/siano/Makefile +++ b/drivers/media/common/siano/Makefile @@ -1,6 +1,7 @@ -smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o +smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o +obj-$(CONFIG_SMS_SIANO_RC) += smsir.o ccflags-y += -Idrivers/media/dvb-core ccflags-y += $(extra-cflags-y) $(extra-cflags-m) diff --git a/drivers/media/common/siano/smsir.h b/drivers/media/common/siano/smsir.h index ae92b3a..69b59b9 100644 --- a/drivers/media/common/siano/smsir.h +++ b/drivers/media/common/siano/smsir.h @@ -46,10 +46,19 @@ struct ir_t { u32 controller; }; +#ifdef CONFIG_SMS_SIANO_RC int sms_ir_init(struct smscore_device_t *coredev); void sms_ir_exit(struct smscore_device_t *coredev); void sms_ir_event(struct smscore_device_t *coredev, const char *buf, int len); +#else +inline static int sms_ir_init(struct smscore_device_t *coredev) { + return 0; +} +inline static void sms_ir_exit(struct smscore_device_t *coredev) {}; +inline static void sms_ir_event(struct smscore_device_t *coredev, + const char *buf, int len) {}; +#endif #endif /* __SMS_IR_H__ */ -- cgit v1.1