linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: linux-input@vger.kernel.org, Marius Iacob <themariusus@gmail.com>
Subject: Re: [PATCH resend] Input: i8042 - Allow insmod to succeed on devices without an i8042 controller
Date: Mon, 26 Oct 2020 20:56:05 -0700	[thread overview]
Message-ID: <20201027035605.GJ444962@dtor-ws> (raw)
In-Reply-To: <20201008112628.3979-2-hdegoede@redhat.com>

On Thu, Oct 08, 2020 at 01:26:28PM +0200, Hans de Goede wrote:
> The i8042 module exports several symbols which may be used by other
> modules.
> 
> Before this commit it would refuse to load (when built as a module itself)
> on systems without an i8042 controller.
> 
> This is a problem specifically for the asus-nb-wmi module. Many Asus
> laptops support the Asus WMI interface. Some of them have an i8042
> controller and need to use i8042_install_filter() to filter some kbd
> events. Other models do not have an i8042 controller (e.g. they use an
> USB attached kbd).
> 
> Before this commit the asus-nb-wmi driver could not be loaded on Asus
> models without an i8042 controller, when the i8042 code was built as
> a module (as Arch Linux does) because the module_init function of the
> i8042 module would fail with -ENODEV and thus the i8042_install_filter
> symbol could not be loaded.
> 
> This commit fixes this by exiting from module_init with a return code
> of 0 if no controller is found.  It also adds a i8042_present bool to
> make the module_exit function a no-op in this case and also adds a
> check for i8042_present to the exported i8042_command function.
> 
> The latter i8042_present check should not really be necessary because
> when builtin that function can already be used on systems without
> an i8042 controller, but better safe then sorry.
> 
> Reported-and-tested-by: Marius Iacob <themariusus@gmail.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied, thank you.

-- 
Dmitry

      reply	other threads:[~2020-10-27  3:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 11:26 [PATCH resend 0/1] Input: i8042 - Allow insmod to succeed on devices without an i8042 controller Hans de Goede
2020-10-08 11:26 ` [PATCH resend] " Hans de Goede
2020-10-27  3:56   ` Dmitry Torokhov [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=20201027035605.GJ444962@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=themariusus@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).