From patchwork Sun Jan 26 21:00:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gundersen X-Patchwork-Id: 3540061 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 088529F391 for ; Sun, 26 Jan 2014 21:00:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 392C220121 for ; Sun, 26 Jan 2014 21:00:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C466F20114 for ; Sun, 26 Jan 2014 21:00:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753195AbaAZVAY (ORCPT ); Sun, 26 Jan 2014 16:00:24 -0500 Received: from mail-ea0-f182.google.com ([209.85.215.182]:34794 "EHLO mail-ea0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753102AbaAZVAV (ORCPT ); Sun, 26 Jan 2014 16:00:21 -0500 Received: by mail-ea0-f182.google.com with SMTP id r15so1958670ead.27 for ; Sun, 26 Jan 2014 13:00:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=v5lCUsPghoWy8wyQ91kayq3Zn0Pph/EcXIHtmJOjMrA=; b=Clv/tuEwYGTKfucvN7pH+K4qmbBfqoH0/xnR9o5fuqdpkJ5cvf0MNrySGsvju97fcs jpZ3457EG7ZiaMUCIsRzG65+7dEe/hD2jvU9Zsx1G2SEs9MIc6JXp4p3nkCir1TVfmZd doknEOWxgXvv7oTBUSiE5QUZNxTRmowjqnN2+1nrwTms4vh9Q6h/3lkbcEaxR7Hm23X+ P77u6ngdV3Z5mvTesdwEpnWb0NE+k7mKum5lGsPsSc4VXmSxrrt9n8YdXF4R9HIRxIHn PXxh+KJvoW1UoDSVEOnkyc6eJ+/gvo8ag08+ztM4q/QWHZzR+tB0AqqMR12oBhPvRYgf GOBQ== X-Gm-Message-State: ALoCoQkeQ8ybBvugkNZJ/IrJjTgKafwjC4wTNGT9+MNFpN5AUeC02q7yL8o4gttPx/aO/H4thNSo X-Received: by 10.15.34.136 with SMTP id e8mr267308eev.90.1390770020706; Sun, 26 Jan 2014 13:00:20 -0800 (PST) Received: from localhost.localdomain (cm-84.208.70.35.getinternet.no. [84.208.70.35]) by mx.google.com with ESMTPSA id z46sm33558689een.1.2014.01.26.13.00.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Jan 2014 13:00:19 -0800 (PST) From: Tom Gundersen To: linux-input@vger.kernel.org Cc: Tom Gundersen , Dmitry Torokhov Subject: [RFC][PATCH] Input: i8042 - fix PNP modaliases when both aux and kdb are enabled Date: Sun, 26 Jan 2014 22:00:52 +0100 Message-Id: <1390770052-26499-1-git-send-email-teg@jklm.no> X-Mailer: git-send-email 1.8.5.3 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Tom Gundersen --- Hi Dmitry, I don't know if there is a better way to do this, so sending as an RFC. 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) {