From: Jarod Wilson <jarod@redhat.com>
To: Ezequiel Garcia <elezegarcia@gmail.com>
Cc: mchehab@infradead.org, linux-media@vger.kernel.org
Subject: Re: [PATCH] media: rc: Pospone ir raw decoders loading until really needed
Date: Thu, 15 Mar 2012 15:46:51 -0400 [thread overview]
Message-ID: <20120315194651.GA25362@redhat.com> (raw)
In-Reply-To: <1331840342-9191-1-git-send-email-elezegarcia@gmail.com>
On Thu, Mar 15, 2012 at 04:39:02PM -0300, Ezequiel Garcia wrote:
> This changes rc_core to not load the IR decoders at load time,
> postponing it to load only if a RC_DRIVER_IR_RAW device is registered
> via rc_register_device.
>
> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
> ---
> drivers/media/rc/rc-main.c | 8 ++++++--
> include/media/rc-core.h | 2 ++
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
> index f6a930b..adf4a99 100644
> --- a/drivers/media/rc/rc-main.c
> +++ b/drivers/media/rc/rc-main.c
> @@ -1103,6 +1103,12 @@ int rc_register_device(struct rc_dev *dev)
> kfree(path);
>
> if (dev->driver_type == RC_DRIVER_IR_RAW) {
> + /* Load raw decoders, if they aren't already */
> + if (dev->raw_init) {
> + IR_dprintk(1, "Loading raw decoders\n");
> + ir_raw_init();
> + dev->raw_init = true;
> + }
> rc = ir_raw_event_register(dev);
> if (rc < 0)
> goto out_input;
> @@ -1176,8 +1182,6 @@ static int __init rc_core_init(void)
> return rc;
> }
>
> - /* Initialize/load the decoders/keymap code that will be used */
> - ir_raw_init();
> rc_map_register(&empty_map);
>
> return 0;
Uhm. How does this ever actually work? The only place I see raw_init set
to true is inside a conditional that requires it already be true. That's
not going to fly.
--
Jarod Wilson
jarod@redhat.com
prev parent reply other threads:[~2012-03-15 19:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 19:39 [PATCH] media: rc: Pospone ir raw decoders loading until really needed Ezequiel Garcia
2012-03-15 19:39 ` Mauro Carvalho Chehab
2012-03-15 19:52 ` Ezequiel García
2012-03-15 19:46 ` Jarod Wilson [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=20120315194651.GA25362@redhat.com \
--to=jarod@redhat.com \
--cc=elezegarcia@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.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.