From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756705Ab1GRNJV (ORCPT ); Mon, 18 Jul 2011 09:09:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3771 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756556Ab1GRNJO (ORCPT ); Mon, 18 Jul 2011 09:09:14 -0400 From: Prarit Bhargava To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava Subject: [PATCH 33/34] sound/pci/hda changes for SMBIOS and System Firmware Date: Mon, 18 Jul 2011 09:08:47 -0400 Message-Id: <1310994528-26276-34-git-send-email-prarit@redhat.com> In-Reply-To: <1310994528-26276-1-git-send-email-prarit@redhat.com> References: <1310994528-26276-1-git-send-email-prarit@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As part of the new SMBIOS and System Firmware code: - Replace old dmi* structures and functions with new sysfw* and smbios* structures and functions in individual drivers Signed-off-by: Prarit Bhargava --- sound/pci/hda/patch_sigmatel.c | 29 +++++++++++++---------------- 1 files changed, 13 insertions(+), 16 deletions(-) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 7f81cc2..271ea6a 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -4798,26 +4798,23 @@ static void set_hp_led_gpio(struct hda_codec *codec) static int find_mute_led_gpio(struct hda_codec *codec, int default_polarity) { struct sigmatel_spec *spec = codec->spec; - const struct dmi_device *dev = NULL; + const char *str; if ((codec->subsystem_id >> 16) == PCI_VENDOR_ID_HP) { - while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, - NULL, dev))) { - if (sscanf(dev->name, "HP_Mute_LED_%d_%d", - &spec->gpio_led_polarity, - &spec->gpio_led) == 2) { - spec->gpio_led = 1 << spec->gpio_led; - return 1; - } - if (sscanf(dev->name, "HP_Mute_LED_%d", - &spec->gpio_led_polarity) == 1) { - set_hp_led_gpio(codec); - return 1; - } + str = smbios_match_oem_string("HP_Mute_LED_"); + if (sscanf(str, "HP_Mute_LED_%d_%d", &spec->gpio_led_polarity, + &spec->gpio_led) == 2) { + spec->gpio_led = 1 << spec->gpio_led; + return 1; + } + if (sscanf(str, "HP_Mute_LED_%d", + &spec->gpio_led_polarity) == 1) { + set_hp_led_gpio(codec); + return 1; } /* - * Fallback case - if we don't find the DMI strings, + * Fallback case - if we don't find the SMBIOS strings, * we statically set the GPIO - if not a B-series system. */ if (!hp_blike_system(codec->subsystem_id)) { -- 1.6.5.2