]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] siano: allow compiling it without RC support
authorMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 17 Oct 2012 19:59:01 +0000 (16:59 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 17 Oct 2012 19:59:01 +0000 (16:59 -0300)
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>
drivers/media/common/Kconfig
drivers/media/common/siano/Kconfig
drivers/media/common/siano/Makefile
drivers/media/common/siano/smsir.h
drivers/media/mmc/siano/Kconfig
drivers/media/usb/siano/Kconfig

index 121b0110af3c525055e426bb7e206c02f2389c04..d2a436ce77f8c6098ceff2ce4f4d3c974f41b35b 100644 (file)
@@ -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"
index 425aeadfb49dea3f3727bfb5f4c27abf7212cba5..08d5b58dc6724902bd5b5365902a184503d5a57e 100644 (file)
@@ -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.
index 2a09279e0648edd912897140084e001820cbbbb0..0e6f5e9271371b8dc25969300f6eaffbc56592b7 100644 (file)
@@ -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)
index ae92b3a8587e5d4a32e7d5f2a8b35b047f71f2d8..69b59b9eee28efc5b79237ac751ddd37da2ee566 100644 (file)
@@ -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__ */
 
index fa62475be3bf865f730f47e7eef5761ffe6e9522..69f8061602a4ad822cc615af63241637c158a843 100644 (file)
@@ -6,5 +6,6 @@ config SMS_SDIO_DRV
        tristate "Siano SMS1xxx based MDTV via SDIO interface"
        depends on DVB_CORE && RC_CORE && HAS_DMA
        depends on MMC
+       select MEDIA_COMMON_OPTIONS
        ---help---
          Choose if you would like to have Siano's support for SDIO interface
index 3c76e62d820da4ac3ccffe8f8f4cbe6b3229451d..b2c229e73952f701dbb44f51c6e784dc81454318 100644 (file)
@@ -5,6 +5,7 @@
 config SMS_USB_DRV
        tristate "Siano SMS1xxx based MDTV receiver"
        depends on DVB_CORE && RC_CORE && HAS_DMA
+       select MEDIA_COMMON_OPTIONS
        ---help---
          Choose if you would like to have Siano's support for USB interface