From: Prarit Bhargava <prarit@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Prarit Bhargava <prarit@redhat.com>, linux-ide@vger.kernel.org
Subject: [PATCH 13/34] drivers/ide changes for SMBIOS and System Firmware
Date: Mon, 18 Jul 2011 09:08:27 -0400 [thread overview]
Message-ID: <1310994528-26276-14-git-send-email-prarit@redhat.com> (raw)
In-Reply-To: <1310994528-26276-1-git-send-email-prarit@redhat.com>
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
- cleanup sysfw_id lookup tables
Cc: linux-ide@vger.kernel.org
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
---
drivers/ide/alim15x3.c | 18 +++++++++---------
drivers/ide/ide-acpi.c | 16 ++++++++--------
drivers/ide/ide-gd.c | 10 +++++-----
drivers/ide/via82cxxx.c | 14 +++++++-------
4 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c
index 2c8016a..d5194e1 100644
--- a/drivers/ide/alim15x3.c
+++ b/drivers/ide/alim15x3.c
@@ -33,7 +33,7 @@
#include <linux/pci.h>
#include <linux/ide.h>
#include <linux/init.h>
-#include <linux/dmi.h>
+#include <linux/sysfw.h>
#include <asm/io.h>
@@ -333,22 +333,22 @@ out:
* Cable special cases
*/
-static const struct dmi_system_id cable_dmi_table[] = {
+static const struct sysfw_id cable_smbios_table[] = {
{
.ident = "HP Pavilion N5430",
.matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
- DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
+ SYSFW_MATCH(SYSFW_BOARD_VENDOR, "Hewlett-Packard"),
+ SYSFW_MATCH(SYSFW_BOARD_VERSION, "OmniBook N32N-736"),
},
},
{
.ident = "Toshiba Satellite S1800-814",
.matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
- DMI_MATCH(DMI_PRODUCT_NAME, "S1800-814"),
+ SYSFW_MATCH(SYSFW_SYS_VENDOR, "TOSHIBA"),
+ SYSFW_MATCH(SYSFW_PRODUCT_NAME, "S1800-814"),
},
},
- { }
+ {}
};
static int ali_cable_override(struct pci_dev *pdev)
@@ -363,8 +363,8 @@ static int ali_cable_override(struct pci_dev *pdev)
pdev->subsystem_device == 0x8317)
return 1;
- /* Systems by DMI */
- if (dmi_check_system(cable_dmi_table))
+ /* Systems by SMBIOS */
+ if (sysfw_callback(cable_smbios_table))
return 1;
return 0;
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index 2af8cb4..dfcff27 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -16,7 +16,7 @@
#include <acpi/acpi.h>
#include <linux/ide.h>
#include <linux/pci.h>
-#include <linux/dmi.h>
+#include <linux/sysfw.h>
#include <acpi/acpi_bus.h>
@@ -65,31 +65,31 @@ module_param_named(acpionboot, ide_acpionboot, bool, 0);
MODULE_PARM_DESC(acpionboot, "call IDE ACPI methods on boot");
static bool ide_noacpi_psx;
-static int no_acpi_psx(const struct dmi_system_id *id)
+static int no_acpi_psx(const struct sysfw_id *id)
{
ide_noacpi_psx = true;
printk(KERN_NOTICE"%s detected - disable ACPI _PSx.\n", id->ident);
return 0;
}
-static const struct dmi_system_id ide_acpi_dmi_table[] = {
+static const struct sysfw_id ide_acpi_smbios_table[] = {
/* Bug 9673. */
/* We should check if this is because ACPI NVS isn't save/restored. */
{
.callback = no_acpi_psx,
.ident = "HP nx9005",
.matches = {
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies Ltd."),
- DMI_MATCH(DMI_BIOS_VERSION, "KAM1.60")
+ SYSFW_MATCH(SYSFW_BIOS_VENDOR,
+ "Phoenix Technologies Ltd."),
+ SYSFW_MATCH(SYSFW_BIOS_VERSION, "KAM1.60")
},
},
-
- { } /* terminate list */
+ {}
};
int ide_acpi_init(void)
{
- dmi_check_system(ide_acpi_dmi_table);
+ sysfw_callback(ide_acpi_smbios_table);
return 0;
}
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c
index 70ea876..3801f49 100644
--- a/drivers/ide/ide-gd.c
+++ b/drivers/ide/ide-gd.c
@@ -7,8 +7,8 @@
#include <linux/mutex.h>
#include <linux/ide.h>
#include <linux/hdreg.h>
-#include <linux/dmi.h>
#include <linux/slab.h>
+#include <linux/sysfw.h>
#if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT)
#define IDE_DISK_MINORS (1 << PARTN_BITS)
@@ -102,13 +102,13 @@ static void ide_gd_resume(ide_drive_t *drive)
(void)drive->disk_ops->get_capacity(drive);
}
-static const struct dmi_system_id ide_coldreboot_table[] = {
+static const struct sysfw_id ide_coldreboot_table[] = {
{
/* Acer TravelMate 66x cuts power during reboot */
.ident = "Acer TravelMate 660",
.matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
- DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"),
+ SYSFW_MATCH(SYSFW_SYS_VENDOR, "Acer"),
+ SYSFW_MATCH(SYSFW_PRODUCT_NAME, "TravelMate 660"),
},
},
@@ -132,7 +132,7 @@ static void ide_gd_shutdown(ide_drive_t *drive)
if (system_state != SYSTEM_POWER_OFF) {
#else
if (system_state == SYSTEM_RESTART &&
- !dmi_check_system(ide_coldreboot_table)) {
+ !sysfw_callback(ide_coldreboot_table)) {
#endif
drive->disk_ops->flush(drive);
return;
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
index f46f49c..a51eb2b 100644
--- a/drivers/ide/via82cxxx.c
+++ b/drivers/ide/via82cxxx.c
@@ -30,7 +30,7 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/ide.h>
-#include <linux/dmi.h>
+#include <linux/sysfw.h>
#ifdef CONFIG_PPC_CHRP
#include <asm/processor.h>
@@ -354,21 +354,21 @@ static int init_chipset_via82cxxx(struct pci_dev *dev)
* Cable special cases
*/
-static const struct dmi_system_id cable_dmi_table[] = {
+static const struct sysfw_id cable_smbios_table[] = {
{
.ident = "Acer Ferrari 3400",
.matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Acer,Inc."),
- DMI_MATCH(DMI_BOARD_NAME, "Ferrari 3400"),
+ SYSFW_MATCH(SYSFW_BOARD_VENDOR, "Acer,Inc."),
+ SYSFW_MATCH(SYSFW_BOARD_NAME, "Ferrari 3400"),
},
},
- { }
+ {}
};
static int via_cable_override(struct pci_dev *pdev)
{
- /* Systems by DMI */
- if (dmi_check_system(cable_dmi_table))
+ /* Systems by SMBIOS */
+ if (sysfw_callback(cable_smbios_table))
return 1;
/* Arima W730-K8/Targa Visionary 811/... */
--
1.6.5.2
next prev parent reply other threads:[~2011-07-18 13:16 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-18 13:08 [PATCH 00/34] System Firmware and SMBIOS Support [v3] Prarit Bhargava
2011-07-18 13:08 ` [PATCH 01/34] System Firmware Interface Prarit Bhargava
2011-07-19 0:43 ` Andi Kleen
2011-07-19 9:05 ` Alan Cox
2011-07-19 12:23 ` Prarit Bhargava
2011-07-19 13:25 ` Andi Kleen
2011-07-19 13:52 ` Prarit Bhargava
2011-07-19 13:21 ` Andi Kleen
2011-07-19 13:39 ` Prarit Bhargava
2011-07-19 13:46 ` Andi Kleen
2011-07-19 13:58 ` Prarit Bhargava
2011-07-25 19:03 ` [lm-sensors] " Jean Delvare
2011-08-10 13:26 ` Prarit Bhargava
2011-07-18 13:08 ` [PATCH 02/34] New SMBIOS driver for x86 and ia64 Prarit Bhargava
2011-07-18 13:08 ` [PATCH 03/34] arch specific changes for SMBIOS and System Firmware Prarit Bhargava
2011-07-18 13:08 ` [PATCH 04/34] drivers/acpi changes for SMBIOS and System Firmware interface Prarit Bhargava
2011-07-18 13:08 ` [PATCH 05/34] drivers/ata changes for SMBIOS and System Firmware Prarit Bhargava
2011-07-18 13:08 ` [PATCH 06/34] drivers/floppy " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 07/34] drivers/char " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 08/34] drivers/crypto " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 09/34] drivers/gpio " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 10/34] drivers/gpu " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 11/34] drivers/hwmon " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 12/34] drivers/i2c " Prarit Bhargava
2011-07-18 13:08 ` Prarit Bhargava [this message]
2011-07-18 13:08 ` [PATCH 14/34] drivers/input " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 15/34] drivers/leds " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 16/34] drivers/media " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 17/34] drivers/misc " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 18/34] drivers/mtd " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 19/34] drivers/net " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 20/34] drivers/pci " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 21/34] drivers/platform " Prarit Bhargava
2011-08-11 4:30 ` Jonathan Woithe
2011-07-18 13:08 ` [PATCH 22/34] drivers/pnp " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 23/34] drivers/power " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 24/34] drivers/rtc " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 25/34] drivers/staging " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 26/34] drivers/tty " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 27/34] drivers/usb " Prarit Bhargava
2011-07-19 19:47 ` Alan Stern
2011-07-18 13:08 ` [PATCH 28/34] drivers/video " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 29/34] drivers/w1 " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 30/34] drivers/watchdog " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 31/34] include/linux/acpi.h " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 32/34] Kernel panic " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 33/34] sound/pci/hda " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 34/34] Remove old DMI & SMBIOS code and make SMBIOS default on Prarit Bhargava
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310994528-26276-14-git-send-email-prarit@redhat.com \
--to=prarit@redhat.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome