diff options
author | Sylwester Nawrocki <snjw23@gmail.com> | 2011-10-31 11:24:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-03 05:44:05 -0400 |
commit | ff7029f5e8fbf682ace0455f6452d840831a3bc2 (patch) | |
tree | 66fcb06d0b05e2417a0c57e22a2572062217779a | |
parent | 8be62e73e5c088fb4a1c928bdaeac1b27d776043 (diff) |
[media] staging: as102: Unconditionally compile code dependent on DVB_CORE
The driver depends on DVB_CORE so there is no need for conditional
compilation of parts of the code depending on CONFIG_DVB_CORE as
the driver is never compiled with CONFIG_DVB_CORE* disabled.
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/staging/media/as102/as102_drv.c | 12 | ||||
-rw-r--r-- | drivers/staging/media/as102/as102_drv.h | 6 | ||||
-rw-r--r-- | drivers/staging/media/as102/as102_fe.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/as102/as102_usb_drv.c | 4 |
4 files changed, 1 insertions, 23 deletions
diff --git a/drivers/staging/media/as102/as102_drv.c b/drivers/staging/media/as102/as102_drv.c index 27a1571e1aee..d335c7d6fa0f 100644 --- a/drivers/staging/media/as102/as102_drv.c +++ b/drivers/staging/media/as102/as102_drv.c | |||
@@ -30,12 +30,7 @@ | |||
30 | /* header file for Usb device driver*/ | 30 | /* header file for Usb device driver*/ |
31 | #include "as102_drv.h" | 31 | #include "as102_drv.h" |
32 | #include "as102_fw.h" | 32 | #include "as102_fw.h" |
33 | |||
34 | #if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE) | ||
35 | #include "dvbdev.h" | 33 | #include "dvbdev.h" |
36 | #else | ||
37 | #warning >>> DVB_CORE not defined !!! <<< | ||
38 | #endif | ||
39 | 34 | ||
40 | int debug; | 35 | int debug; |
41 | module_param_named(debug, debug, int, 0644); | 36 | module_param_named(debug, debug, int, 0644); |
@@ -65,7 +60,6 @@ MODULE_PARM_DESC(elna_enable, "Activate eLNA (default: on)"); | |||
65 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | 60 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); |
66 | #endif | 61 | #endif |
67 | 62 | ||
68 | #if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE) | ||
69 | static void as102_stop_stream(struct as102_dev_t *dev) | 63 | static void as102_stop_stream(struct as102_dev_t *dev) |
70 | { | 64 | { |
71 | struct as102_bus_adapter_t *bus_adap; | 65 | struct as102_bus_adapter_t *bus_adap; |
@@ -200,14 +194,12 @@ static int as102_dvb_dmx_stop_feed(struct dvb_demux_feed *dvbdmxfeed) | |||
200 | LEAVE(); | 194 | LEAVE(); |
201 | return 0; | 195 | return 0; |
202 | } | 196 | } |
203 | #endif | ||
204 | 197 | ||
205 | int as102_dvb_register(struct as102_dev_t *as102_dev) | 198 | int as102_dvb_register(struct as102_dev_t *as102_dev) |
206 | { | 199 | { |
207 | int ret = 0; | 200 | int ret = 0; |
208 | ENTER(); | 201 | ENTER(); |
209 | 202 | ||
210 | #if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE) | ||
211 | ret = dvb_register_adapter(&as102_dev->dvb_adap, | 203 | ret = dvb_register_adapter(&as102_dev->dvb_adap, |
212 | as102_dev->name, | 204 | as102_dev->name, |
213 | THIS_MODULE, | 205 | THIS_MODULE, |
@@ -260,7 +252,6 @@ int as102_dvb_register(struct as102_dev_t *as102_dev) | |||
260 | __func__, ret); | 252 | __func__, ret); |
261 | goto failed; | 253 | goto failed; |
262 | } | 254 | } |
263 | #endif | ||
264 | 255 | ||
265 | /* init bus mutex for token locking */ | 256 | /* init bus mutex for token locking */ |
266 | mutex_init(&as102_dev->bus_adap.lock); | 257 | mutex_init(&as102_dev->bus_adap.lock); |
@@ -288,7 +279,6 @@ void as102_dvb_unregister(struct as102_dev_t *as102_dev) | |||
288 | { | 279 | { |
289 | ENTER(); | 280 | ENTER(); |
290 | 281 | ||
291 | #if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE) | ||
292 | /* unregister as102 frontend */ | 282 | /* unregister as102 frontend */ |
293 | as102_dvb_unregister_fe(&as102_dev->dvb_fe); | 283 | as102_dvb_unregister_fe(&as102_dev->dvb_fe); |
294 | 284 | ||
@@ -298,7 +288,7 @@ void as102_dvb_unregister(struct as102_dev_t *as102_dev) | |||
298 | 288 | ||
299 | /* unregister dvb adapter */ | 289 | /* unregister dvb adapter */ |
300 | dvb_unregister_adapter(&as102_dev->dvb_adap); | 290 | dvb_unregister_adapter(&as102_dev->dvb_adap); |
301 | #endif | 291 | |
302 | LEAVE(); | 292 | LEAVE(); |
303 | } | 293 | } |
304 | 294 | ||
diff --git a/drivers/staging/media/as102/as102_drv.h b/drivers/staging/media/as102/as102_drv.h index cd11b1628f44..bcda635b5a99 100644 --- a/drivers/staging/media/as102/as102_drv.h +++ b/drivers/staging/media/as102/as102_drv.h | |||
@@ -30,11 +30,9 @@ extern struct usb_driver as102_usb_driver; | |||
30 | extern struct spi_driver as102_spi_driver; | 30 | extern struct spi_driver as102_spi_driver; |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE) | ||
34 | #include "dvb_demux.h" | 33 | #include "dvb_demux.h" |
35 | #include "dvb_frontend.h" | 34 | #include "dvb_frontend.h" |
36 | #include "dmxdev.h" | 35 | #include "dmxdev.h" |
37 | #endif | ||
38 | 36 | ||
39 | #define DRIVER_FULL_NAME "Abilis Systems as10x usb driver" | 37 | #define DRIVER_FULL_NAME "Abilis Systems as10x usb driver" |
40 | #define DRIVER_NAME "as10x_usb" | 38 | #define DRIVER_NAME "as10x_usb" |
@@ -112,12 +110,10 @@ struct as102_dev_t { | |||
112 | struct kref kref; | 110 | struct kref kref; |
113 | unsigned long minor; | 111 | unsigned long minor; |
114 | 112 | ||
115 | #if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE) | ||
116 | struct dvb_adapter dvb_adap; | 113 | struct dvb_adapter dvb_adap; |
117 | struct dvb_frontend dvb_fe; | 114 | struct dvb_frontend dvb_fe; |
118 | struct dvb_demux dvb_dmx; | 115 | struct dvb_demux dvb_dmx; |
119 | struct dmxdev dvb_dmxdev; | 116 | struct dmxdev dvb_dmxdev; |
120 | #endif | ||
121 | 117 | ||
122 | /* demodulator stats */ | 118 | /* demodulator stats */ |
123 | struct as10x_demod_stats demod_stats; | 119 | struct as10x_demod_stats demod_stats; |
@@ -139,9 +135,7 @@ struct as102_dev_t { | |||
139 | int as102_dvb_register(struct as102_dev_t *dev); | 135 | int as102_dvb_register(struct as102_dev_t *dev); |
140 | void as102_dvb_unregister(struct as102_dev_t *dev); | 136 | void as102_dvb_unregister(struct as102_dev_t *dev); |
141 | 137 | ||
142 | #if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE) | ||
143 | int as102_dvb_register_fe(struct as102_dev_t *dev, struct dvb_frontend *fe); | 138 | int as102_dvb_register_fe(struct as102_dev_t *dev, struct dvb_frontend *fe); |
144 | int as102_dvb_unregister_fe(struct dvb_frontend *dev); | 139 | int as102_dvb_unregister_fe(struct dvb_frontend *dev); |
145 | #endif | ||
146 | 140 | ||
147 | /* EOF - vim: set textwidth=80 ts=8 sw=8 sts=8 noet: */ | 141 | /* EOF - vim: set textwidth=80 ts=8 sw=8 sts=8 noet: */ |
diff --git a/drivers/staging/media/as102/as102_fe.c b/drivers/staging/media/as102/as102_fe.c index 049548677111..874c698e80a8 100644 --- a/drivers/staging/media/as102/as102_fe.c +++ b/drivers/staging/media/as102/as102_fe.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | extern int elna_enable; | 26 | extern int elna_enable; |
27 | 27 | ||
28 | #if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE) | ||
29 | static void as10x_fe_copy_tps_parameters(struct dvb_frontend_parameters *dst, | 28 | static void as10x_fe_copy_tps_parameters(struct dvb_frontend_parameters *dst, |
30 | struct as10x_tps *src); | 29 | struct as10x_tps *src); |
31 | 30 | ||
@@ -672,6 +671,5 @@ static void as102_fe_copy_tune_parameters(struct as10x_tune_args *tune_args, | |||
672 | as102_fe_get_code_rate(params->u.ofdm.code_rate_HP); | 671 | as102_fe_get_code_rate(params->u.ofdm.code_rate_HP); |
673 | } | 672 | } |
674 | } | 673 | } |
675 | #endif | ||
676 | 674 | ||
677 | /* EOF - vim: set textwidth=80 ts=8 sw=8 sts=8 noet: */ | 675 | /* EOF - vim: set textwidth=80 ts=8 sw=8 sts=8 noet: */ |
diff --git a/drivers/staging/media/as102/as102_usb_drv.c b/drivers/staging/media/as102/as102_usb_drv.c index 70b21f342408..ae1d38db2fee 100644 --- a/drivers/staging/media/as102/as102_usb_drv.c +++ b/drivers/staging/media/as102/as102_usb_drv.c | |||
@@ -214,13 +214,9 @@ void as102_urb_stream_irq(struct urb *urb) | |||
214 | struct as102_dev_t *as102_dev = urb->context; | 214 | struct as102_dev_t *as102_dev = urb->context; |
215 | 215 | ||
216 | if (urb->actual_length > 0) { | 216 | if (urb->actual_length > 0) { |
217 | #if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE) | ||
218 | dvb_dmx_swfilter(&as102_dev->dvb_dmx, | 217 | dvb_dmx_swfilter(&as102_dev->dvb_dmx, |
219 | urb->transfer_buffer, | 218 | urb->transfer_buffer, |
220 | urb->actual_length); | 219 | urb->actual_length); |
221 | #else | ||
222 | /* do nothing ? */ | ||
223 | #endif | ||
224 | } else { | 220 | } else { |
225 | if (urb->actual_length == 0) | 221 | if (urb->actual_length == 0) |
226 | memset(urb->transfer_buffer, 0, AS102_USB_BUF_SIZE); | 222 | memset(urb->transfer_buffer, 0, AS102_USB_BUF_SIZE); |