All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] em28xx: Make all em28xx extensions to be initialized asynchronously
Date: Tue, 02 Oct 2012 22:24:49 +0300	[thread overview]
Message-ID: <506B3F81.3040404@iki.fi> (raw)
In-Reply-To: <1349203178-7782-1-git-send-email-mchehab@redhat.com>

On 10/02/2012 09:39 PM, Mauro Carvalho Chehab wrote:
> em28xx-dvb, em28xx-alsa and em28xx-ir are typically initialized
> asyncrhronously. The exception for it is when those modules
> are loaded before em28xx (or before an em28xx card insertion) or
> when they're built in.
>
> Make the extentions to always load asynchronously. That allows
> having all DVB firmwares loaded synchronously with udev-182.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Tested-by: Antti Palosaari <crope@iki.fi>

Hauppauge WinTV HVR 930C
MaxMedia UB425-TC
PCTV QuatroStick nano (520e)


> ---
>   drivers/media/usb/em28xx/em28xx-cards.c | 22 ++++++++++------------
>   1 file changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
> index ca62b99..ab98d08 100644
> --- a/drivers/media/usb/em28xx/em28xx-cards.c
> +++ b/drivers/media/usb/em28xx/em28xx-cards.c
> @@ -2875,12 +2875,20 @@ static void em28xx_card_setup(struct em28xx *dev)
>   }
>
>
> -#if defined(CONFIG_MODULES) && defined(MODULE)
>   static void request_module_async(struct work_struct *work)
>   {
>   	struct em28xx *dev = container_of(work,
>   			     struct em28xx, request_module_wk);
>
> +	/*
> +	 * The em28xx extensions can be modules or builtin. If the
> +	 * modules are already loaded or are built in, those extensions
> +	 * can be initialised right now. Otherwise, the module init
> +	 * code will do it.
> +	 */
> +	em28xx_init_extension(dev);
> +
> +#if defined(CONFIG_MODULES) && defined(MODULE)
>   	if (dev->has_audio_class)
>   		request_module("snd-usb-audio");
>   	else if (dev->has_alsa_audio)
> @@ -2890,6 +2898,7 @@ static void request_module_async(struct work_struct *work)
>   		request_module("em28xx-dvb");
>   	if (dev->board.ir_codes && !disable_ir)
>   		request_module("em28xx-rc");
> +#endif /* CONFIG_MODULES */
>   }
>
>   static void request_modules(struct em28xx *dev)
> @@ -2902,10 +2911,6 @@ static void flush_request_modules(struct em28xx *dev)
>   {
>   	flush_work_sync(&dev->request_module_wk);
>   }
> -#else
> -#define request_modules(dev)
> -#define flush_request_modules(dev)
> -#endif /* CONFIG_MODULES */
>
>   /*
>    * em28xx_release_resources()
> @@ -3324,13 +3329,6 @@ static int em28xx_usb_probe(struct usb_interface *interface,
>   	 */
>   	mutex_unlock(&dev->lock);
>
> -	/*
> -	 * These extensions can be modules. If the modules are already
> -	 * loaded then we can initialise the device now, otherwise we
> -	 * will initialise it when the modules load instead.
> -	 */
> -	em28xx_init_extension(dev);
> -
>   	return 0;
>
>   unlock_and_free:
>


-- 
http://palosaari.fi/

      reply	other threads:[~2012-10-02 19:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 18:39 [PATCH] em28xx: Make all em28xx extensions to be initialized asynchronously Mauro Carvalho Chehab
2012-10-02 19:24 ` Antti Palosaari [this message]

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=506B3F81.3040404@iki.fi \
    --to=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.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 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.