diff options
author | Antti Palosaari <crope@iki.fi> | 2012-12-09 20:27:59 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-06 10:17:36 -0200 |
commit | b963c2083ae3ec67052dfc6e2ec8216c479843d8 (patch) | |
tree | b1ba47b6f8158d831a0f1cd0d8e9914d194e6821 /drivers/media/usb/dvb-usb-v2/it913x.c | |
parent | 7b75322af1bd3b365ce3a5f2ac6df329bf725656 (diff) | |
download | lwn-b963c2083ae3ec67052dfc6e2ec8216c479843d8.tar.gz lwn-b963c2083ae3ec67052dfc6e2ec8216c479843d8.zip |
[media] it913x: make remote controller optional
Do not compile remote controller when RC-core is disabled by Kconfig.
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/it913x.c')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/it913x.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/it913x.c b/drivers/media/usb/dvb-usb-v2/it913x.c index 744c9f9f7680..b8593bda725c 100644 --- a/drivers/media/usb/dvb-usb-v2/it913x.c +++ b/drivers/media/usb/dvb-usb-v2/it913x.c @@ -308,6 +308,7 @@ static struct i2c_algorithm it913x_i2c_algo = { }; /* Callbacks for DVB USB */ +#if defined(CONFIG_RC_CORE) || defined(CONFIG_RC_CORE_MODULE) #define IT913X_POLL 250 static int it913x_rc_query(struct dvb_usb_device *d) { @@ -334,6 +335,25 @@ static int it913x_rc_query(struct dvb_usb_device *d) return ret; } +static int it913x_get_rc_config(struct dvb_usb_device *d, struct dvb_usb_rc *rc) +{ + struct it913x_state *st = d->priv; + + if (st->proprietary_ir == false) { + rc->map_name = NULL; + return 0; + } + + rc->allowed_protos = RC_BIT_NEC; + rc->query = it913x_rc_query; + rc->interval = 250; + + return 0; +} +#else + #define it913x_get_rc_config NULL +#endif + /* Firmware sets raw */ static const char fw_it9135_v1[] = FW_IT9135_V1; static const char fw_it9135_v2[] = FW_IT9135_V2; @@ -696,22 +716,6 @@ static int it913x_frontend_attach(struct dvb_usb_adapter *adap) } /* DVB USB Driver */ -static int it913x_get_rc_config(struct dvb_usb_device *d, struct dvb_usb_rc *rc) -{ - struct it913x_state *st = d->priv; - - if (st->proprietary_ir == false) { - rc->map_name = NULL; - return 0; - } - - rc->allowed_protos = RC_BIT_NEC; - rc->query = it913x_rc_query; - rc->interval = 250; - - return 0; -} - static int it913x_get_adapter_count(struct dvb_usb_device *d) { struct it913x_state *st = d->priv; |