All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] input: make serio_register_driver() return error code
Date: Wed, 8 Nov 2006 21:36:36 +0900	[thread overview]
Message-ID: <20061108123636.GA14871@localhost> (raw)
In-Reply-To: <d120d5000611070620l5a0731d8jd5778bc8c8b49b2b@mail.gmail.com>

On Tue, Nov 07, 2006 at 09:20:07AM -0500, Dmitry Torokhov wrote:
> >This patch makes serio_register_driver() call driver_register()
> >directly instead of kseriod so that it can check whether
> >driver_register() is succeeded or not.
> >
> 
> This slows down boot process because probing for mice and keyboards
> takes too long (for some touchpads it takes about 4 seconds to do

I understand the reason why driver_register() is done by kseriod.

> reset). We could change allocation from GFP_ATOMIC to GFP_KERNEL for
> SERIO_REGISTER_DRIVER events to make it more robust but otherwise I'd
> leave serio_register_driver return void. You could also add a flag to
> serio driver indicating whether registration is complete and check
> that flag in serio_unregister_driver so it does not do stupid things.

I reorganzed the patch set.

serio driver registration can fail in two different ways.

1) serio_event allocation failure by serio_register_driver().

   It happens in module_init() context. It is possible to check this
   allocation failure by making serio_register_driver() return error.

2) driver_register() failure by kseriod.

   This failure cannot be checked by serio_register_driver().
   But it is necessary to prevent serio_unregister_driver() from
   trying to call driver_unregister() with not registered driver
   by adding flag to serio driver indicating whether registration is
   complete.

1/4: make serio_register_driver() return error -- 1)
2/4: check serio_register_driver() error -- 1)
3/4: check whether serio dirver registration is completed -- 2)
4/4: change to GFP_KERNEL for SERIO_REGISTER_DRIVER event allocation


  reply	other threads:[~2006-11-08 12:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-07 12:06 [PATCH 1/2] input: make serio_register_driver() return error code Akinobu Mita
2006-11-07 14:20 ` Dmitry Torokhov
2006-11-08 12:36   ` Akinobu Mita [this message]
2006-11-08 12:38     ` [PATCH 1/4] input: make serio_register_driver() return error Akinobu Mita
2006-11-08 12:39     ` [PATCH 2/4] input: check serio_register_driver() error Akinobu Mita
2006-11-08 12:40     ` [PATCH 3/4] input: check whether serio dirver registration is completed Akinobu Mita
2006-11-11 16:12       ` Alexey Dobriyan
2006-11-08 12:41     ` [PATCH 4/4] input: change to GFP_KERNEL for SERIO_REGISTER_DRIVER event allocation Akinobu Mita
2006-11-17  6:37     ` [PATCH 1/2] input: make serio_register_driver() return error code Dmitry Torokhov
2006-11-18  6:51       ` Akinobu Mita

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=20061108123636.GA14871@localhost \
    --to=akinobu.mita@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-kernel@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.