From patchwork Sun Aug 25 12:31:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 1152757 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rere.qmqm.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="ZMZRHE1T"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46GZHv6Q5Bz9s7T for ; Sun, 25 Aug 2019 22:31:23 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbfHYMbV (ORCPT ); Sun, 25 Aug 2019 08:31:21 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:54431 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726182AbfHYMbV (ORCPT ); Sun, 25 Aug 2019 08:31:21 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 46GZFz2DnWz55; Sun, 25 Aug 2019 14:29:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1566736183; bh=vZsP+gC6xjkhdwkU8RmUdpu99NTy+OKDeJJ+3qq5kYI=; h=Date:From:Subject:To:Cc:From; b=ZMZRHE1TUw+O6DnjyEJH55gwzmnFGtQock72ZLgmnL0kUwHZR+00TCEkDbTJ8IIXK 2RJO/iFKs0OsqsFTu1Oae6j2OEAmN2TKpzP5QMEPivRTT3R/x8qajRx+s2OE81r5Jl N8gvx2iu3vHZRwUtmVL3UYeMjHXqRBKAtiiHOgJOyzmzugXIDVw5/9OjpXeYaPZdnb Lrc7xuC1a4zlr4BiAnBQVFcTre+fV7KmPeXwArRrgVi03P+wvrPxsw4ieK6Ohf9tFB pJ0atbODbU0EXW7LwnLvxG6IuTPWJYkYISzHsrbf908bku/iRj09ugVb1AdcruXo73 M1ToJmT36+SZg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.101.2 at mail Date: Sun, 25 Aug 2019 14:31:18 +0200 Message-Id: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH] ata_piix: remove open-coded dmi_match(DMI_OEM_STRING) MIME-Version: 1.0 To: linux-ide@vger.kernel.org Cc: Jens Axboe , linux-kernel@vger.kernel.org Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Since de40614de99 ("firmware: dmi_scan: Add DMI_OEM_STRING support to dmi_matches") dmi_check_system() can match OEM_STRINGs itself. Use the feature. Signed-off-by: Michał Mirosław --- drivers/ata/ata_piix.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index e4da725381d3..3ca7720e7d8f 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -840,6 +840,12 @@ static int piix_broken_suspend(void) DMI_MATCH(DMI_PRODUCT_NAME, "Tecra M3"), }, }, + { + .ident = "TECRA M3", + .matches = { + DMI_MATCH(DMI_OEM_STRING, "Tecra M3,"), + }, + }, { .ident = "TECRA M4", .matches = { @@ -955,18 +961,10 @@ static int piix_broken_suspend(void) { } /* terminate list */ }; - static const char *oemstrs[] = { - "Tecra M3,", - }; - int i; if (dmi_check_system(sysids)) return 1; - for (i = 0; i < ARRAY_SIZE(oemstrs); i++) - if (dmi_find_device(DMI_DEV_TYPE_OEM_STRING, oemstrs[i], NULL)) - return 1; - /* TECRA M4 sometimes forgets its identify and reports bogus * DMI information. As the bogus information is a bit * generic, match as many entries as possible. This manual