Message ID | 1355100335-2123-7-git-send-email-crope@iki.fi (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Care to Ack that one too? regards Antti On 12/10/2012 02:45 AM, Antti Palosaari wrote: > 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; >
On Sun, Dec 9, 2012 at 10:45 PM, Antti Palosaari <crope@iki.fi> wrote: > 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) Maybe you could use: #if IS_ENABLED(CONFIG_RC_CORE) Regards, Fabio Estevam -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 01/02/2013 05:24 AM, Fabio Estevam wrote: > On Sun, Dec 9, 2012 at 10:45 PM, Antti Palosaari <crope@iki.fi> wrote: >> 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) > > Maybe you could use: > > #if IS_ENABLED(CONFIG_RC_CORE) > > Regards, > > Fabio Estevam Thanks for the pointing that macro. I will sent new patch top of that serie which replaces all "defined(CONFIG_RC_CORE) || defined(CONFIG_RC_CORE_MODULE)" with "IS_ENABLED(CONFIG_RC_CORE)" what I added. regards Antti
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;
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(-)