diff options
author | Antti Palosaari <crope@iki.fi> | 2012-11-28 22:05:35 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-06 07:15:07 -0500 |
commit | 0c87c66aa383b045c437e7cf456eef28a8aa7b66 (patch) | |
tree | 03be03c9d8d730e2ec3bc81c8cbc00fe0fc0aea8 /drivers/media/usb/dvb-usb-v2 | |
parent | 24b9f50170f55a3179c6f6d51022eb7d50502d05 (diff) |
[media] dvb_usb_v2: make remote controller optional
Make it possible to compile dvb_usb_v2 driver without the remote
controller (RC-core).
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/Kconfig | 3 | ||||
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/dvb_usb.h | 9 | ||||
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 12 |
3 files changed, 23 insertions, 1 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/Kconfig b/drivers/media/usb/dvb-usb-v2/Kconfig index 3240d559ef7b..7b5773fe6367 100644 --- a/drivers/media/usb/dvb-usb-v2/Kconfig +++ b/drivers/media/usb/dvb-usb-v2/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config DVB_USB_V2 | 1 | config DVB_USB_V2 |
2 | tristate "Support for various USB DVB devices v2" | 2 | tristate "Support for various USB DVB devices v2" |
3 | depends on DVB_CORE && USB && I2C && RC_CORE | 3 | depends on DVB_CORE && USB && I2C |
4 | help | 4 | help |
5 | By enabling this you will be able to choose the various supported | 5 | By enabling this you will be able to choose the various supported |
6 | USB1.1 and USB2.0 DVB devices. | 6 | USB1.1 and USB2.0 DVB devices. |
@@ -113,6 +113,7 @@ config DVB_USB_IT913X | |||
113 | config DVB_USB_LME2510 | 113 | config DVB_USB_LME2510 |
114 | tristate "LME DM04/QQBOX DVB-S USB2.0 support" | 114 | tristate "LME DM04/QQBOX DVB-S USB2.0 support" |
115 | depends on DVB_USB_V2 | 115 | depends on DVB_USB_V2 |
116 | depends on RC_CORE | ||
116 | select DVB_TDA10086 if MEDIA_SUBDRV_AUTOSELECT | 117 | select DVB_TDA10086 if MEDIA_SUBDRV_AUTOSELECT |
117 | select DVB_TDA826X if MEDIA_SUBDRV_AUTOSELECT | 118 | select DVB_TDA826X if MEDIA_SUBDRV_AUTOSELECT |
118 | select DVB_STV0288 if MEDIA_SUBDRV_AUTOSELECT | 119 | select DVB_STV0288 if MEDIA_SUBDRV_AUTOSELECT |
diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb.h b/drivers/media/usb/dvb-usb-v2/dvb_usb.h index 059291b892b8..e2678a78db4c 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb.h +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb.h | |||
@@ -400,4 +400,13 @@ extern int dvb_usbv2_reset_resume(struct usb_interface *); | |||
400 | extern int dvb_usbv2_generic_rw(struct dvb_usb_device *, u8 *, u16, u8 *, u16); | 400 | extern int dvb_usbv2_generic_rw(struct dvb_usb_device *, u8 *, u16, u8 *, u16); |
401 | extern int dvb_usbv2_generic_write(struct dvb_usb_device *, u8 *, u16); | 401 | extern int dvb_usbv2_generic_write(struct dvb_usb_device *, u8 *, u16); |
402 | 402 | ||
403 | /* stub implementations that will be never called when RC-core is disabled */ | ||
404 | #if !defined(CONFIG_RC_CORE) && !defined(CONFIG_RC_CORE_MODULE) | ||
405 | #define rc_repeat(args...) | ||
406 | #define rc_keydown(args...) | ||
407 | #define rc_keydown_notimeout(args...) | ||
408 | #define rc_keyup(args...) | ||
409 | #define rc_g_keycode_from_table(args...) 0 | ||
410 | #endif | ||
411 | |||
403 | #endif | 412 | #endif |
diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c index 671b4fa232b4..94f134c4e942 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | |||
@@ -102,6 +102,7 @@ static int dvb_usbv2_i2c_exit(struct dvb_usb_device *d) | |||
102 | return 0; | 102 | return 0; |
103 | } | 103 | } |
104 | 104 | ||
105 | #if defined(CONFIG_RC_CORE) || defined(CONFIG_RC_CORE_MODULE) | ||
105 | static void dvb_usb_read_remote_control(struct work_struct *work) | 106 | static void dvb_usb_read_remote_control(struct work_struct *work) |
106 | { | 107 | { |
107 | struct dvb_usb_device *d = container_of(work, | 108 | struct dvb_usb_device *d = container_of(work, |
@@ -202,6 +203,17 @@ static int dvb_usbv2_remote_exit(struct dvb_usb_device *d) | |||
202 | 203 | ||
203 | return 0; | 204 | return 0; |
204 | } | 205 | } |
206 | #else | ||
207 | static int dvb_usbv2_remote_init(struct dvb_usb_device *d) | ||
208 | { | ||
209 | return 0; | ||
210 | } | ||
211 | |||
212 | static int dvb_usbv2_remote_exit(struct dvb_usb_device *d) | ||
213 | { | ||
214 | return 0; | ||
215 | } | ||
216 | #endif | ||
205 | 217 | ||
206 | static void dvb_usb_data_complete(struct usb_data_stream *stream, u8 *buf, | 218 | static void dvb_usb_data_complete(struct usb_data_stream *stream, u8 *buf, |
207 | size_t len) | 219 | size_t len) |