Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2707276imu; Sun, 27 Jan 2019 11:04:30 -0800 (PST) X-Google-Smtp-Source: ALg8bN5MLDgcuWcOnyYnvLKremuODp1QzvmQnPvmlA3WMxXZIQ1ugNt2Tepij+ZSepK0Z4G6Epbe X-Received: by 2002:a62:184e:: with SMTP id 75mr18844552pfy.28.1548615870326; Sun, 27 Jan 2019 11:04:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548615870; cv=none; d=google.com; s=arc-20160816; b=EPEPfxR4OaqQgvNcJgMQ6B84XrLeiWQCk8zsPuo6uYrRdFs+h9Fxf4AoqVCUZ6JLbm mtVI9bklVaAfFwmTqswHzR5881Ybe1u1ZzJZKj5y/xziRNaXw7p0Y1reO/rGgrIqDrTb 6oqd/ddbaOqLrWiqvBAcHVH2WCCR2uNlLt9k58S+WnBCq7+q4C4Oz3j+sjFIdEr1imUy woUUyZHPHuX2DDzU6z7aP0KhoNyMK/4pfs9CYfMsm7k6z2/1yB+alSCSZINqQSptlHhs Q0bECWhnCdFD+I8KgRxQnhXe3Q8NlRHPiPYAVEsGBFyDL42/cp88x2+ahUfHjYCL5Qhp m4SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=txWJ/xGhTjIVos0/tXgqd/CkVnE7kWsqSGmUvvcjsXE=; b=ObAhvfpTm34Yh8hVOloXW2Lo+4slM/qy5RDobBYnvRER/1eoeBRTBriT0dWXeRi72O H3/fpwYkaGH6jljaQqlR59n85XHUniEYWehGd0pJ23zQucRE/6kRzryF/TYpsMcUZJ+Y XkL1XrThujmlqS/dtfUCUFFHz1KYPoJV2UByigdceGJ4EahLF5pssrBwPSAdeLqhpAwR XivKHvsiHXU9sv3Bq2ZqPiSxkWfy+q3p0pRXrVJwsNQ2/05zqIi1PNr3FuRT6hlw/w0X EEx9n9EP6ANorHETB7vnvT8czFwYgKIdcn3cpTpT+iCwvFK9oWxBAKnVj0UcPa43Q9nx JG+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mok.nu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i30si30112122pgm.76.2019.01.27.11.04.14; Sun, 27 Jan 2019 11:04:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mok.nu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726948AbfA0TEI (ORCPT + 99 others); Sun, 27 Jan 2019 14:04:08 -0500 Received: from proxy04.fsdata.se ([89.221.252.227]:33575 "EHLO mail-gw01.fsdata.se" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726630AbfA0TEH (ORCPT ); Sun, 27 Jan 2019 14:04:07 -0500 Received: from localhost (94.234.44.129) by DAG01.HMC.local (192.168.46.11) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sun, 27 Jan 2019 20:03:47 +0100 From: Mattias Jacobsson <2pi@mok.nu> To: , , , , , , CC: <2pi@mok.nu>, , Subject: [PATCH v2 0/3] platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE() Date: Sun, 27 Jan 2019 20:03:26 +0100 Message-ID: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [94.234.44.129] X-ClientProxiedBy: PROXY04.HMC.local (192.168.46.54) To DAG01.HMC.local (192.168.46.11) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The kernel provides the macro MODULE_DEVICE_TABLE() which can help driver authors to generate the appropriate MODULE_ALIAS() output. The WMI device type is currently not supported by MODULE_DEVICE_TABLE(). While using MODULE_DEVICE_TABLE() does increase the complexity as well as spreading out the implementation across the kernel, it does come with some benefits too; * It makes different drivers look more similar; if you can specify the array of device_ids any device type specific input to MODULE_ALIAS() will automatically be generated for you. * It helps each driver avoid keeping multiple versions of the same information in sync. That is, both the array of device_ids and the potential multitude of MODULE_ALIAS()'s. * Other things eg. [2] This patchset adds WMI support to MODULE_DEVICE_TABLE(). [PATCH 1/3]: prepare struct wmi_device_id [PATCH 2/3]: add support [PATCH 3/3]: update existing drivers to use MODULE_DEVICE_TABLE() Changes in v2: * add one Suggested-by and one Reviewed-by tag * depend upon patch [1] * reword commit message for [PATCH 2/3] and [PATCH 3/3] to document the reasoning behind the changes [1]: https://lkml.kernel.org/r/20190122200302.19861-1-2pi@mok.nu [2]: https://lkml.kernel.org/r/20190126210634.GB13882@wrath Mattias Jacobsson (3): platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE() platform/x86: wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS() drivers/platform/x86/dell-smbios-wmi.c | 2 +- drivers/platform/x86/dell-wmi-descriptor.c | 2 +- drivers/platform/x86/dell-wmi.c | 4 ++-- drivers/platform/x86/huawei-wmi.c | 3 +-- drivers/platform/x86/intel-wmi-thunderbolt.c | 2 +- drivers/platform/x86/wmi-bmof.c | 2 +- drivers/platform/x86/wmi.c | 2 +- include/linux/mod_devicetable.h | 13 +++++++++++++ include/linux/wmi.h | 5 +---- scripts/mod/devicetable-offsets.c | 3 +++ scripts/mod/file2alias.c | 18 ++++++++++++++++++ 11 files changed, 43 insertions(+), 13 deletions(-) -- 2.20.1