From: Tom Gundersen <teg@jklm.no>
To: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Cc: Tom Gundersen <teg@jklm.no>, Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [RFC][PATCH] Input: i8042 - fix PNP modaliases when both aux and kdb are enabled
Date: Mon, 27 Jan 2014 15:57:26 +0100 [thread overview]
Message-ID: <CAG-2HqXo7Hq2runx+n_+01NoOpbYNyUpUF3KCFC5n_3ZsKM5eg@mail.gmail.com> (raw)
In-Reply-To: <1390770052-26499-1-git-send-email-teg@jklm.no>
On Sun, Jan 26, 2014 at 10:00 PM, Tom Gundersen <teg@jklm.no> wrote:
> Commit 78551277e4 exposed the PNP modaliases for the i8042 module. However,
> the aux entries overrode the kbd ones.
>
> Refactor the device_id lists to expose both the aux and the kbd modaliases.
>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Signed-off-by: Tom Gundersen <teg@jklm.no>
> ---
> Hi Dmitry,
>
> I don't know if there is a better way to do this, so sending as an RFC.
Please disregard this patch for now, I'll first try to get in a
generic fix to MODULE_DEVICE_TABLE().
Cheers,
Tom
> drivers/input/serio/i8042-x86ia64io.h | 67 ++++++++++++++++++++---------------
> 1 file changed, 39 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
> index 0ec9abb..dbc6958 100644
> --- a/drivers/input/serio/i8042-x86ia64io.h
> +++ b/drivers/input/serio/i8042-x86ia64io.h
> @@ -747,25 +747,27 @@ static int i8042_pnp_aux_probe(struct pnp_dev *dev, const struct pnp_device_id *
> return 0;
> }
>
> -static struct pnp_device_id pnp_kbd_devids[] = {
> - { .id = "PNP0300", .driver_data = 0 },
> - { .id = "PNP0301", .driver_data = 0 },
> - { .id = "PNP0302", .driver_data = 0 },
> - { .id = "PNP0303", .driver_data = 0 },
> - { .id = "PNP0304", .driver_data = 0 },
> - { .id = "PNP0305", .driver_data = 0 },
> - { .id = "PNP0306", .driver_data = 0 },
> - { .id = "PNP0309", .driver_data = 0 },
> - { .id = "PNP030a", .driver_data = 0 },
> - { .id = "PNP030b", .driver_data = 0 },
> - { .id = "PNP0320", .driver_data = 0 },
> - { .id = "PNP0343", .driver_data = 0 },
> - { .id = "PNP0344", .driver_data = 0 },
> - { .id = "PNP0345", .driver_data = 0 },
> +#define KBD_DEVIDS \
> + { .id = "PNP0300", .driver_data = 0 }, \
> + { .id = "PNP0301", .driver_data = 0 }, \
> + { .id = "PNP0302", .driver_data = 0 }, \
> + { .id = "PNP0303", .driver_data = 0 }, \
> + { .id = "PNP0304", .driver_data = 0 }, \
> + { .id = "PNP0305", .driver_data = 0 }, \
> + { .id = "PNP0306", .driver_data = 0 }, \
> + { .id = "PNP0309", .driver_data = 0 }, \
> + { .id = "PNP030a", .driver_data = 0 }, \
> + { .id = "PNP030b", .driver_data = 0 }, \
> + { .id = "PNP0320", .driver_data = 0 }, \
> + { .id = "PNP0343", .driver_data = 0 }, \
> + { .id = "PNP0344", .driver_data = 0 }, \
> + { .id = "PNP0345", .driver_data = 0 }, \
> { .id = "CPQA0D7", .driver_data = 0 },
> +
> +static struct pnp_device_id pnp_kbd_devids[] = {
> + KBD_DEVIDS
> { .id = "", },
> };
> -MODULE_DEVICE_TABLE(pnp, pnp_kbd_devids);
>
> static struct pnp_driver i8042_pnp_kbd_driver = {
> .name = "i8042 kbd",
> @@ -773,21 +775,23 @@ static struct pnp_driver i8042_pnp_kbd_driver = {
> .probe = i8042_pnp_kbd_probe,
> };
>
> -static struct pnp_device_id pnp_aux_devids[] = {
> - { .id = "AUI0200", .driver_data = 0 },
> - { .id = "FJC6000", .driver_data = 0 },
> - { .id = "FJC6001", .driver_data = 0 },
> - { .id = "PNP0f03", .driver_data = 0 },
> - { .id = "PNP0f0b", .driver_data = 0 },
> - { .id = "PNP0f0e", .driver_data = 0 },
> - { .id = "PNP0f12", .driver_data = 0 },
> - { .id = "PNP0f13", .driver_data = 0 },
> - { .id = "PNP0f19", .driver_data = 0 },
> - { .id = "PNP0f1c", .driver_data = 0 },
> +#define AUX_DEVIDS \
> + { .id = "AUI0200", .driver_data = 0 }, \
> + { .id = "FJC6000", .driver_data = 0 }, \
> + { .id = "FJC6001", .driver_data = 0 }, \
> + { .id = "PNP0f03", .driver_data = 0 }, \
> + { .id = "PNP0f0b", .driver_data = 0 }, \
> + { .id = "PNP0f0e", .driver_data = 0 }, \
> + { .id = "PNP0f12", .driver_data = 0 }, \
> + { .id = "PNP0f13", .driver_data = 0 }, \
> + { .id = "PNP0f19", .driver_data = 0 }, \
> + { .id = "PNP0f1c", .driver_data = 0 }, \
> { .id = "SYN0801", .driver_data = 0 },
> +
> +static struct pnp_device_id pnp_aux_devids[] = {
> + AUX_DEVIDS
> { .id = "", },
> };
> -MODULE_DEVICE_TABLE(pnp, pnp_aux_devids);
>
> static struct pnp_driver i8042_pnp_aux_driver = {
> .name = "i8042 aux",
> @@ -795,6 +799,13 @@ static struct pnp_driver i8042_pnp_aux_driver = {
> .probe = i8042_pnp_aux_probe,
> };
>
> +static struct pnp_device_id pnp_kdb_aux_devids[] = {
> + KBD_DEVIDS
> + AUX_DEVIDS
> + { .id = "", },
> +};
> +MODULE_DEVICE_TABLE(pnp, pnp_kdb_aux_devids);
> +
> static void i8042_pnp_exit(void)
> {
> if (i8042_pnp_kbd_registered) {
> --
> 1.8.5.3
>
prev parent reply other threads:[~2014-01-27 14:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-26 21:00 [RFC][PATCH] Input: i8042 - fix PNP modaliases when both aux and kdb are enabled Tom Gundersen
2014-01-27 14:57 ` Tom Gundersen [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=CAG-2HqXo7Hq2runx+n_+01NoOpbYNyUpUF3KCFC5n_3ZsKM5eg@mail.gmail.com \
--to=teg@jklm.no \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@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 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).