diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-06-18 09:19:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:53:03 -0400 |
commit | 5b89ecf98998911f397fa913b06ee2304a373e54 (patch) | |
tree | 1d89d7b8fa0e5e330ce6e43ac13085de1d6fedb5 /drivers/media/video/em28xx | |
parent | 0f8a61fc42a618e25c61549590c35c66c63e2ca7 (diff) |
[media] em28xx: Allow to compile it without RC/input support
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r-- | drivers/media/video/em28xx/Kconfig | 10 | ||||
-rw-r--r-- | drivers/media/video/em28xx/Makefile | 6 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 17 |
3 files changed, 30 insertions, 3 deletions
diff --git a/drivers/media/video/em28xx/Kconfig b/drivers/media/video/em28xx/Kconfig index 3cb78f26df90..49878fd0c8f4 100644 --- a/drivers/media/video/em28xx/Kconfig +++ b/drivers/media/video/em28xx/Kconfig | |||
@@ -3,7 +3,6 @@ config VIDEO_EM28XX | |||
3 | depends on VIDEO_DEV && I2C | 3 | depends on VIDEO_DEV && I2C |
4 | select VIDEO_TUNER | 4 | select VIDEO_TUNER |
5 | select VIDEO_TVEEPROM | 5 | select VIDEO_TVEEPROM |
6 | depends on RC_CORE | ||
7 | select VIDEOBUF_VMALLOC | 6 | select VIDEOBUF_VMALLOC |
8 | select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO | 7 | select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO |
9 | select VIDEO_TVP5150 if VIDEO_HELPER_CHIPS_AUTO | 8 | select VIDEO_TVP5150 if VIDEO_HELPER_CHIPS_AUTO |
@@ -44,3 +43,12 @@ config VIDEO_EM28XX_DVB | |||
44 | ---help--- | 43 | ---help--- |
45 | This adds support for DVB cards based on the | 44 | This adds support for DVB cards based on the |
46 | Empiatech em28xx chips. | 45 | Empiatech em28xx chips. |
46 | |||
47 | config VIDEO_EM28XX_RC | ||
48 | bool "EM28XX Remote Controller support" | ||
49 | depends on RC_CORE | ||
50 | depends on VIDEO_EM28XX | ||
51 | depends on !(RC_CORE=m && VIDEO_EM28XX=y) | ||
52 | default y | ||
53 | ---help--- | ||
54 | Enables Remote Controller support on em28xx driver. | ||
diff --git a/drivers/media/video/em28xx/Makefile b/drivers/media/video/em28xx/Makefile index d0f093d1d0df..38aaa004f57d 100644 --- a/drivers/media/video/em28xx/Makefile +++ b/drivers/media/video/em28xx/Makefile | |||
@@ -1,5 +1,7 @@ | |||
1 | em28xx-objs := em28xx-video.o em28xx-i2c.o em28xx-cards.o em28xx-core.o \ | 1 | em28xx-y := em28xx-video.o em28xx-i2c.o em28xx-cards.o |
2 | em28xx-input.o em28xx-vbi.o | 2 | em28xx-y += em28xx-core.o em28xx-vbi.o |
3 | |||
4 | em28xx-$(CONFIG_VIDEO_EM28XX_RC) += em28xx-input.o | ||
3 | 5 | ||
4 | em28xx-alsa-objs := em28xx-audio.o | 6 | em28xx-alsa-objs := em28xx-audio.o |
5 | 7 | ||
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 28b9954d9326..f9b77b4c90e4 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -697,6 +697,9 @@ int em28xx_tuner_callback(void *ptr, int component, int command, int arg); | |||
697 | void em28xx_release_resources(struct em28xx *dev); | 697 | void em28xx_release_resources(struct em28xx *dev); |
698 | 698 | ||
699 | /* Provided by em28xx-input.c */ | 699 | /* Provided by em28xx-input.c */ |
700 | |||
701 | #ifdef CONFIG_VIDEO_EM28XX_RC | ||
702 | |||
700 | int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); | 703 | int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); |
701 | int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); | 704 | int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); |
702 | int em28xx_get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key, | 705 | int em28xx_get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key, |
@@ -709,6 +712,20 @@ void em28xx_deregister_snapshot_button(struct em28xx *dev); | |||
709 | int em28xx_ir_init(struct em28xx *dev); | 712 | int em28xx_ir_init(struct em28xx *dev); |
710 | int em28xx_ir_fini(struct em28xx *dev); | 713 | int em28xx_ir_fini(struct em28xx *dev); |
711 | 714 | ||
715 | #else | ||
716 | |||
717 | #define em28xx_get_key_terratec NULL | ||
718 | #define em28xx_get_key_em_haup NULL | ||
719 | #define em28xx_get_key_pinnacle_usb_grey NULL | ||
720 | #define em28xx_get_key_winfast_usbii_deluxe NULL | ||
721 | |||
722 | static inline void em28xx_register_snapshot_button(struct em28xx *dev) {} | ||
723 | static inline void em28xx_deregister_snapshot_button(struct em28xx *dev) {} | ||
724 | static inline int em28xx_ir_init(struct em28xx *dev) { return 0; } | ||
725 | static inline int em28xx_ir_fini(struct em28xx *dev) { return 0; } | ||
726 | |||
727 | #endif | ||
728 | |||
712 | /* Provided by em28xx-vbi.c */ | 729 | /* Provided by em28xx-vbi.c */ |
713 | extern struct videobuf_queue_ops em28xx_vbi_qops; | 730 | extern struct videobuf_queue_ops em28xx_vbi_qops; |
714 | 731 | ||