Commit ff7029f5 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab

[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: default avatarSylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8be62e73
...@@ -30,12 +30,7 @@ ...@@ -30,12 +30,7 @@
/* header file for Usb device driver*/ /* header file for Usb device driver*/
#include "as102_drv.h" #include "as102_drv.h"
#include "as102_fw.h" #include "as102_fw.h"
#if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE)
#include "dvbdev.h" #include "dvbdev.h"
#else
#warning >>> DVB_CORE not defined !!! <<<
#endif
int debug; int debug;
module_param_named(debug, debug, int, 0644); module_param_named(debug, debug, int, 0644);
...@@ -65,7 +60,6 @@ MODULE_PARM_DESC(elna_enable, "Activate eLNA (default: on)"); ...@@ -65,7 +60,6 @@ MODULE_PARM_DESC(elna_enable, "Activate eLNA (default: on)");
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
#endif #endif
#if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE)
static void as102_stop_stream(struct as102_dev_t *dev) static void as102_stop_stream(struct as102_dev_t *dev)
{ {
struct as102_bus_adapter_t *bus_adap; struct as102_bus_adapter_t *bus_adap;
...@@ -200,14 +194,12 @@ static int as102_dvb_dmx_stop_feed(struct dvb_demux_feed *dvbdmxfeed) ...@@ -200,14 +194,12 @@ static int as102_dvb_dmx_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
LEAVE(); LEAVE();
return 0; return 0;
} }
#endif
int as102_dvb_register(struct as102_dev_t *as102_dev) int as102_dvb_register(struct as102_dev_t *as102_dev)
{ {
int ret = 0; int ret = 0;
ENTER(); ENTER();
#if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE)
ret = dvb_register_adapter(&as102_dev->dvb_adap, ret = dvb_register_adapter(&as102_dev->dvb_adap,
as102_dev->name, as102_dev->name,
THIS_MODULE, THIS_MODULE,
...@@ -260,7 +252,6 @@ int as102_dvb_register(struct as102_dev_t *as102_dev) ...@@ -260,7 +252,6 @@ int as102_dvb_register(struct as102_dev_t *as102_dev)
__func__, ret); __func__, ret);
goto failed; goto failed;
} }
#endif
/* init bus mutex for token locking */ /* init bus mutex for token locking */
mutex_init(&as102_dev->bus_adap.lock); mutex_init(&as102_dev->bus_adap.lock);
...@@ -288,7 +279,6 @@ void as102_dvb_unregister(struct as102_dev_t *as102_dev) ...@@ -288,7 +279,6 @@ void as102_dvb_unregister(struct as102_dev_t *as102_dev)
{ {
ENTER(); ENTER();
#if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE)
/* unregister as102 frontend */ /* unregister as102 frontend */
as102_dvb_unregister_fe(&as102_dev->dvb_fe); as102_dvb_unregister_fe(&as102_dev->dvb_fe);
...@@ -298,7 +288,7 @@ void as102_dvb_unregister(struct as102_dev_t *as102_dev) ...@@ -298,7 +288,7 @@ void as102_dvb_unregister(struct as102_dev_t *as102_dev)
/* unregister dvb adapter */ /* unregister dvb adapter */
dvb_unregister_adapter(&as102_dev->dvb_adap); dvb_unregister_adapter(&as102_dev->dvb_adap);
#endif
LEAVE(); LEAVE();
} }
......
...@@ -30,11 +30,9 @@ extern struct usb_driver as102_usb_driver; ...@@ -30,11 +30,9 @@ extern struct usb_driver as102_usb_driver;
extern struct spi_driver as102_spi_driver; extern struct spi_driver as102_spi_driver;
#endif #endif
#if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE)
#include "dvb_demux.h" #include "dvb_demux.h"
#include "dvb_frontend.h" #include "dvb_frontend.h"
#include "dmxdev.h" #include "dmxdev.h"
#endif
#define DRIVER_FULL_NAME "Abilis Systems as10x usb driver" #define DRIVER_FULL_NAME "Abilis Systems as10x usb driver"
#define DRIVER_NAME "as10x_usb" #define DRIVER_NAME "as10x_usb"
...@@ -112,12 +110,10 @@ struct as102_dev_t { ...@@ -112,12 +110,10 @@ struct as102_dev_t {
struct kref kref; struct kref kref;
unsigned long minor; unsigned long minor;
#if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE)
struct dvb_adapter dvb_adap; struct dvb_adapter dvb_adap;
struct dvb_frontend dvb_fe; struct dvb_frontend dvb_fe;
struct dvb_demux dvb_dmx; struct dvb_demux dvb_dmx;
struct dmxdev dvb_dmxdev; struct dmxdev dvb_dmxdev;
#endif
/* demodulator stats */ /* demodulator stats */
struct as10x_demod_stats demod_stats; struct as10x_demod_stats demod_stats;
...@@ -139,9 +135,7 @@ struct as102_dev_t { ...@@ -139,9 +135,7 @@ struct as102_dev_t {
int as102_dvb_register(struct as102_dev_t *dev); int as102_dvb_register(struct as102_dev_t *dev);
void as102_dvb_unregister(struct as102_dev_t *dev); void as102_dvb_unregister(struct as102_dev_t *dev);
#if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE)
int as102_dvb_register_fe(struct as102_dev_t *dev, struct dvb_frontend *fe); int as102_dvb_register_fe(struct as102_dev_t *dev, struct dvb_frontend *fe);
int as102_dvb_unregister_fe(struct dvb_frontend *dev); int as102_dvb_unregister_fe(struct dvb_frontend *dev);
#endif
/* EOF - vim: set textwidth=80 ts=8 sw=8 sts=8 noet: */ /* EOF - vim: set textwidth=80 ts=8 sw=8 sts=8 noet: */
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
extern int elna_enable; extern int elna_enable;
#if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE)
static void as10x_fe_copy_tps_parameters(struct dvb_frontend_parameters *dst, static void as10x_fe_copy_tps_parameters(struct dvb_frontend_parameters *dst,
struct as10x_tps *src); struct as10x_tps *src);
...@@ -672,6 +671,5 @@ static void as102_fe_copy_tune_parameters(struct as10x_tune_args *tune_args, ...@@ -672,6 +671,5 @@ static void as102_fe_copy_tune_parameters(struct as10x_tune_args *tune_args,
as102_fe_get_code_rate(params->u.ofdm.code_rate_HP); as102_fe_get_code_rate(params->u.ofdm.code_rate_HP);
} }
} }
#endif
/* EOF - vim: set textwidth=80 ts=8 sw=8 sts=8 noet: */ /* EOF - vim: set textwidth=80 ts=8 sw=8 sts=8 noet: */
...@@ -214,13 +214,9 @@ void as102_urb_stream_irq(struct urb *urb) ...@@ -214,13 +214,9 @@ void as102_urb_stream_irq(struct urb *urb)
struct as102_dev_t *as102_dev = urb->context; struct as102_dev_t *as102_dev = urb->context;
if (urb->actual_length > 0) { if (urb->actual_length > 0) {
#if defined(CONFIG_DVB_CORE) || defined(CONFIG_DVB_CORE_MODULE)
dvb_dmx_swfilter(&as102_dev->dvb_dmx, dvb_dmx_swfilter(&as102_dev->dvb_dmx,
urb->transfer_buffer, urb->transfer_buffer,
urb->actual_length); urb->actual_length);
#else
/* do nothing ? */
#endif
} else { } else {
if (urb->actual_length == 0) if (urb->actual_length == 0)
memset(urb->transfer_buffer, 0, AS102_USB_BUF_SIZE); memset(urb->transfer_buffer, 0, AS102_USB_BUF_SIZE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment