Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3929051imj; Tue, 19 Feb 2019 12:01:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IaPPmbJP/gLtzxOnewaYQTwjPWEUv2FDEWAuLzcBpDH4HxQbe9ZA24HPpesBNGmt75CumCp X-Received: by 2002:a63:7444:: with SMTP id e4mr2539570pgn.398.1550606478241; Tue, 19 Feb 2019 12:01:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550606478; cv=none; d=google.com; s=arc-20160816; b=RerzM1/4bAv54q1xOX17bWkQAwZfIeDXf9udFI7qEeq2nwrFO79ylm34VVjodqLNkf e7cSEm10mCY0Oxashqm719+ibFQCD/XJQwnbvBOwW2BgiFVpK6O/OlTQsgslRmECkxnw 48JuYpKuZxgn/SLzU8/pemcK8P/tccU8Lb2m3jGjcrHT+2CBiD2yjOOC3yfzK7u1jUwB LTgogWaS+HqUOkvie73rgz0zc3CT9vXxRf6DZw69ytr+HjxITCPM2WZvVzbkF0mHqwJZ hgbfDzY6+i87k/L9Vl3sJr8H8wlyYPG1owZ8jIqMox6Z7EY7j9Nqf2xmWeQrgW01V6ot 7QDQ== 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=ZSzoGPa/p5EtZkCxqHpFZoD9qW4BpEch7O0jC2K48cg=; b=vj31zLTHQXfV499sh9rgu5/IU3UmmtaYaEsKz08dxN3J6Zx2N93Lq0h8RLyuRf5ZpP 3uEVzEg6vRPtJoJkip1JY3eFiAv7TuAfO69YmCB9+WIU/ZFoAiwy16djjcywLGygkPsU p5syDnD4CVLYMbbABcEylDORWESneSiI2YRGKTOa34mLHdOK17hn0gvteamer85m9jBB AfDZu2Kj31+X5qP9akmPogQJ7jg/HVgr74YxpCDl/HSn3RGD7+FApbyfUrdZUZsqQ/1W m6se14V9NrqqpIsjyh0bOPRmppM7+KqOOKlDLLMqTbXo2VxZwxnrfSu3OUakuukbE5VX uhsg== 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 d10si16525109pgh.591.2019.02.19.12.01.02; Tue, 19 Feb 2019 12:01:18 -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 S1729433AbfBSUAQ (ORCPT + 99 others); Tue, 19 Feb 2019 15:00:16 -0500 Received: from proxy01.fsdata.se ([89.221.252.211]:22220 "EHLO mail-gw01.fsdata.se" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725963AbfBSUAP (ORCPT ); Tue, 19 Feb 2019 15:00:15 -0500 Received: from localhost (94.234.42.81) by DAG01.HMC.local (192.168.46.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 19 Feb 2019 21:00:05 +0100 From: Mattias Jacobsson <2pi@mok.nu> To: , , , , , , CC: <2pi@mok.nu>, , Subject: [PATCH v4 0/8] platform/x86: wmi: add WMI support to Date: Tue, 19 Feb 2019 20:59:48 +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.42.81] X-ClientProxiedBy: PROXY05.HMC.local (192.168.46.55) 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 v4: * formatting(declare/assignment, line-breaks) according to comments * split "PATCH 3/3" into one patch per driver according to comments * depend upon patch [3] (macro ALIAS_SIZE) Changes in v3: * use UUID_STRING_LEN instead of self-defined * change loop condition in wmi_dev_match() according to comments * change the usage of snprintf return code in do_wmi_entry() 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 [3]: https://lore.kernel.org/lkml/20190207123022.7961-1-2pi@mok.nu/ Mattias Jacobsson (8): platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE() platform/x86: dell-smbios-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS() platform/x86: dell-wmi-descriptor: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS() platform/x86: dell-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS() platform/x86: huawei-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS() platform/x86: intel-wmi-thunderbolt: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS() platform/x86: wmi-bmof: 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 | 12 ++++++++++ include/linux/wmi.h | 5 +---- scripts/mod/devicetable-offsets.c | 3 +++ scripts/mod/file2alias.c | 23 ++++++++++++++++++++ 11 files changed, 47 insertions(+), 13 deletions(-) -- 2.20.1