All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Antti Palosaari <crope@iki.fi>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH RFC 01/11] dvb_usb_v2: make remote controller optional
Date: Sun, 6 Jan 2013 10:11:29 -0200	[thread overview]
Message-ID: <20130106101129.552100d3@redhat.com> (raw)
In-Reply-To: <1355100335-2123-1-git-send-email-crope@iki.fi>

Em Mon, 10 Dec 2012 02:45:25 +0200
Antti Palosaari <crope@iki.fi> escreveu:

> Make it possible to compile dvb_usb_v2 driver without the remote
> controller (RC-core).
> 
> Signed-off-by: Antti Palosaari <crope@iki.fi>
> ---
>  drivers/media/usb/dvb-usb-v2/Kconfig        |  3 ++-
>  drivers/media/usb/dvb-usb-v2/dvb_usb.h      |  9 +++++++++
>  drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 12 ++++++++++++
>  3 files changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/usb/dvb-usb-v2/Kconfig b/drivers/media/usb/dvb-usb-v2/Kconfig
> index 834bfec..60f4240 100644
> --- a/drivers/media/usb/dvb-usb-v2/Kconfig
> +++ b/drivers/media/usb/dvb-usb-v2/Kconfig
> @@ -1,6 +1,6 @@
>  config DVB_USB_V2
>  	tristate "Support for various USB DVB devices v2"
> -	depends on DVB_CORE && USB && I2C && RC_CORE
> +	depends on DVB_CORE && USB && I2C
>  	help
>  	  By enabling this you will be able to choose the various supported
>  	  USB1.1 and USB2.0 DVB devices.
> @@ -113,6 +113,7 @@ config DVB_USB_IT913X
>  config DVB_USB_LME2510
>  	tristate "LME DM04/QQBOX DVB-S USB2.0 support"
>  	depends on DVB_USB_V2
> +	depends on RC_CORE
>  	select DVB_TDA10086 if MEDIA_SUBDRV_AUTOSELECT
>  	select DVB_TDA826X if MEDIA_SUBDRV_AUTOSELECT
>  	select DVB_STV0288 if MEDIA_SUBDRV_AUTOSELECT
> diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb.h b/drivers/media/usb/dvb-usb-v2/dvb_usb.h
> index 059291b..e2678a7 100644
> --- a/drivers/media/usb/dvb-usb-v2/dvb_usb.h
> +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb.h
> @@ -400,4 +400,13 @@ extern int dvb_usbv2_reset_resume(struct usb_interface *);
>  extern int dvb_usbv2_generic_rw(struct dvb_usb_device *, u8 *, u16, u8 *, u16);
>  extern int dvb_usbv2_generic_write(struct dvb_usb_device *, u8 *, u16);
>  
> +/* stub implementations that will be never called when RC-core is disabled */
> +#if !defined(CONFIG_RC_CORE) && !defined(CONFIG_RC_CORE_MODULE)
> +#define rc_repeat(args...)
> +#define rc_keydown(args...)
> +#define rc_keydown_notimeout(args...)
> +#define rc_keyup(args...)
> +#define rc_g_keycode_from_table(args...) 0
> +#endif
> +

Those stub seem to be miss-placed: they belong to rc-core, and not to dvb-usb-v2.
So, those changes should be, instead, at: include/media/rc-core.h

>  #endif
> diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
> index 671b4fa..94f134c 100644
> --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
> +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
> @@ -102,6 +102,7 @@ static int dvb_usbv2_i2c_exit(struct dvb_usb_device *d)
>  	return 0;
>  }
>  
> +#if defined(CONFIG_RC_CORE) || defined(CONFIG_RC_CORE_MODULE)
>  static void dvb_usb_read_remote_control(struct work_struct *work)
>  {
>  	struct dvb_usb_device *d = container_of(work,
> @@ -202,6 +203,17 @@ static int dvb_usbv2_remote_exit(struct dvb_usb_device *d)
>  
>  	return 0;
>  }
> +#else
> +static int dvb_usbv2_remote_init(struct dvb_usb_device *d)
> +{
> +	return 0;
> +}
> +
> +static int dvb_usbv2_remote_exit(struct dvb_usb_device *d)
> +{
> +	return 0;
> +}
> +#endif
>  
>  static void dvb_usb_data_complete(struct usb_data_stream *stream, u8 *buf,
>  		size_t len)


-- 

Cheers,
Mauro

  parent reply	other threads:[~2013-01-06 12:12 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 ` [PATCH RFC 07/11] it913x: " Antti Palosaari
2013-01-01 21:16   ` 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 ` Mauro Carvalho Chehab [this message]
2013-01-06 12:16   ` [PATCH RFC 01/11] dvb_usb_v2: make remote controller optional 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=20130106101129.552100d3@redhat.com \
    --to=mchehab@redhat.com \
    --cc=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.