From patchwork Tue Apr 17 19:45:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Limonciello, Mario" X-Patchwork-Id: 10346743 X-Patchwork-Delegate: dvhart@infradead.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9FCAC6039A for ; Tue, 17 Apr 2018 19:46:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EE3827C05 for ; Tue, 17 Apr 2018 19:46:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8128227BA5; Tue, 17 Apr 2018 19:46:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B907227BA5 for ; Tue, 17 Apr 2018 19:46:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbeDQTqI (ORCPT ); Tue, 17 Apr 2018 15:46:08 -0400 Received: from esa3.dell-outbound.iphmx.com ([68.232.153.94]:5876 "EHLO esa3.dell-outbound.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751878AbeDQTqI (ORCPT ); Tue, 17 Apr 2018 15:46:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1523993886; x=1555529886; h=from:to:cc:subject:date:message-id; bh=m5cXvu+tEbRLIHMtJogAxUeLVM0q+4GmqS7kIQJnS70=; b=r/XJZ5TAylbQQ30v7Ch4O2wfw8pE4qY54RiRa4bczaQlUBzCs8UwKeiR LNdiMLdv2TOljH1hf9lp8W91UmQ1HK896NEo5VrdAXTfgT+DlA1IAOpoj 620RmS0VwIkhzrSy5UKVJgxjtt/XMvuc4EaGQrT8rsc6flmMo9ijVE1fF 0=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EqAgDGTdZah8mZ6ERdhFR6KJkCgwOSa?= =?us-ascii?q?IE9OwsbEIQ+glwhNRcBAgEBAQEBAQIBAQIQAQEBCgsJCCgjDII1JAEKBEspAy8?= =?us-ascii?q?BAQEBAQEBAQEBAQEBAQEBAQEBARUCDUNqME9vARKFDahViEKCJYgGgVQ/gQ+CX?= =?us-ascii?q?YM/Aoc0AoxmiwIIgWGMWgKMSgEYkAuBJR4BgghwgxMJghcOCSmDHIpwUY5oAQE?= X-IPAS-Result: =?us-ascii?q?A2EqAgDGTdZah8mZ6ERdhFR6KJkCgwOSaIE9OwsbEIQ+glw?= =?us-ascii?q?hNRcBAgEBAQEBAQIBAQIQAQEBCgsJCCgjDII1JAEKBEspAy8BAQEBAQEBAQEBA?= =?us-ascii?q?QEBAQEBAQEBARUCDUNqME9vARKFDahViEKCJYgGgVQ/gQ+CXYM/Aoc0AoxmiwI?= =?us-ascii?q?IgWGMWgKMSgEYkAuBJR4BgghwgxMJghcOCSmDHIpwUY5oAQE?= Received: from esa1.dell-outbound2.iphmx.com ([68.232.153.201]) by esa3.dell-outbound.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2018 14:38:06 -0500 Received: from ausc60ps301.us.dell.com ([143.166.148.206]) by esa1.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2018 01:37:51 +0600 X-LoopCount0: from 10.208.86.39 X-IronPort-AV: E=Sophos;i="5.48,464,1517896800"; d="scan'208";a="1134609170" X-DLP: DLP_GlobalPCIDSS From: Mario Limonciello To: dvhart@infradead.org, Andy Shevchenko Cc: LKML , platform-driver-x86@vger.kernel.org, Mario Limonciello Subject: [PATCH] platform/x86: dell-smbios: Match on www.dell.com in OEM strings too Date: Tue, 17 Apr 2018 14:45:56 -0500 Message-Id: <1523994356-9598-1-git-send-email-mario.limonciello@dell.com> X-Mailer: git-send-email 2.7.4 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sergey reported that some much older Dell systems don't support the OEM string "Dell System" but instead supported www.dell.com in OEM strings. Match both of these to indicate that this driver is running on a Dell system. Reported-by: Sergey Kubushyn Signed-off-by: Mario Limonciello Tested-by: Sergey Kubushyn --- drivers/platform/x86/dell-smbios-base.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/dell-smbios-base.c b/drivers/platform/x86/dell-smbios-base.c index 2485c80..fbd6557 100644 --- a/drivers/platform/x86/dell-smbios-base.c +++ b/drivers/platform/x86/dell-smbios-base.c @@ -555,11 +555,15 @@ static void free_group(struct platform_device *pdev) static int __init dell_smbios_init(void) { - const struct dmi_device *valid; + const struct dmi_device *valid_dell_system; + const struct dmi_device *valid_www; int ret, wmi, smm; - valid = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL); - if (!valid) { + valid_dell_system = + dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL); + valid_www = + dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL); + if (!valid_dell_system && !valid_www) { pr_err("Unable to run on non-Dell system\n"); return -ENODEV; }