From: Antti Palosaari <crope@iki.fi>
To: linux-media@vger.kernel.org
Cc: Antti Palosaari <crope@iki.fi>, Malcolm Priestley <tvboxspy@gmail.com>
Subject: [PATCH RFC 07/11] it913x: make remote controller optional
Date: Mon, 10 Dec 2012 02:45:31 +0200 [thread overview]
Message-ID: <1355100335-2123-7-git-send-email-crope@iki.fi> (raw)
In-Reply-To: <1355100335-2123-1-git-send-email-crope@iki.fi>
Do not compile remote controller when RC-core is disabled by Kconfig.
Cc: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
---
drivers/media/usb/dvb-usb-v2/it913x.c | 36 +++++++++++++++++++----------------
1 file 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 4720428..5dc352b 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;
@@ -695,22 +715,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;
--
1.7.11.7
next prev parent reply other threads:[~2012-12-10 0:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 0:45 [PATCH RFC 01/11] dvb_usb_v2: make remote controller optional Antti Palosaari
2012-12-10 0:45 ` [PATCH RFC 02/11] rtl28xxu: " Antti Palosaari
2012-12-10 0:45 ` [PATCH RFC 03/11] anysee: " Antti Palosaari
2012-12-10 0:45 ` [PATCH RFC 04/11] af9015: " Antti Palosaari
2012-12-10 0:45 ` [PATCH RFC 05/11] af9035: " Antti Palosaari
2012-12-10 0:45 ` [PATCH RFC 06/11] az6007: " Antti Palosaari
2012-12-10 17:22 ` Mauro Carvalho Chehab
2012-12-10 0:45 ` Antti Palosaari [this message]
2013-01-01 21:16 ` [PATCH RFC 07/11] it913x: " Antti Palosaari
2013-01-02 3:24 ` Fabio Estevam
2013-01-02 10:44 ` Antti Palosaari
2012-12-10 0:45 ` [PATCH RFC 08/11] it913x: remove unused define and increase module version Antti Palosaari
2012-12-10 19:02 ` Malcolm Priestley
2012-12-10 0:45 ` [PATCH RFC 09/11] dvb_usb_v2: remove rc-core stub implementations Antti Palosaari
2012-12-10 0:45 ` [PATCH RFC 10/11] dvb_usb_v2: use dummy function defines instead stub functions Antti Palosaari
2012-12-10 0:45 ` [PATCH RFC 11/11] dvb_usb_v2: change rc polling active/deactive logic Antti Palosaari
2013-01-06 12:11 ` [PATCH RFC 01/11] dvb_usb_v2: make remote controller optional Mauro Carvalho Chehab
2013-01-06 12:16 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355100335-2123-7-git-send-email-crope@iki.fi \
--to=crope@iki.fi \
--cc=linux-media@vger.kernel.org \
--cc=tvboxspy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).