From: Prarit Bhargava <prarit@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Prarit Bhargava <prarit@redhat.com>, evel@driverdev.osuosl.org
Subject: [PATCH 25/34] drivers/staging changes for SMBIOS and System Firmware
Date: Mon, 18 Jul 2011 09:08:39 -0400 [thread overview]
Message-ID: <1310994528-26276-26-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
- cleanup of includes for dmi.h and mod_devicetable.h which were included in
some files that did not need them
[v2]: Re-exported dmi MODULE_ALIAS
Cc: evel@driverdev.osuosl.org
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
---
drivers/staging/hv/hv_mouse.c | 1 -
drivers/staging/hv/hv_timesource.c | 18 +++++++++---------
drivers/staging/hv/hv_util.c | 17 ++++++++---------
drivers/staging/hv/netvsc_drv.c | 17 ++++++++---------
drivers/staging/hv/vmbus_drv.c | 1 -
5 files changed, 25 insertions(+), 29 deletions(-)
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 359e737..b40c23f 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -23,7 +23,6 @@
#include <linux/hid.h>
#include <linux/hiddev.h>
#include <linux/pci.h>
-#include <linux/dmi.h>
#include <linux/delay.h>
#include "hyperv.h"
diff --git a/drivers/staging/hv/hv_timesource.c b/drivers/staging/hv/hv_timesource.c
index 0efb049..34dc583 100644
--- a/drivers/staging/hv/hv_timesource.c
+++ b/drivers/staging/hv/hv_timesource.c
@@ -27,7 +27,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/pci.h>
-#include <linux/dmi.h>
+#include <linux/sysfw.h>
#include <asm/hyperv.h>
#include <asm/mshyperv.h>
#include <asm/hypervisor.h>
@@ -61,19 +61,19 @@ static struct clocksource hyperv_cs = {
.shift = HV_CLOCK_SHIFT,
};
-static const struct dmi_system_id __initconst
-hv_timesource_dmi_table[] __maybe_unused = {
+static const struct sysfw_id __initconst
+hv_timesource_smbios_table[] __maybe_unused = {
{
.ident = "Hyper-V",
.matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
- DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"),
+ SYSFW_MATCH(SYSFW_SYS_VENDOR, "Microsoft Corporation"),
+ SYSFW_MATCH(SYSFW_PRODUCT_NAME, "Virtual Machine"),
+ SYSFW_MATCH(SYSFW_BOARD_NAME, "Virtual Machine"),
},
},
- { },
+ {},
};
-MODULE_DEVICE_TABLE(dmi, hv_timesource_dmi_table);
+MODULE_DEVICE_TABLE(smbios, hv_timesource_smbios_table);
static const struct pci_device_id __initconst
hv_timesource_pci_table[] __maybe_unused = {
@@ -89,7 +89,7 @@ static int __init init_hv_clocksource(void)
!(ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE))
return -ENODEV;
- if (!dmi_check_system(hv_timesource_dmi_table))
+ if (!sysfw_callback(hv_timesource_smbios_table))
return -ENODEV;
pr_info("Registering HyperV clock source\n");
diff --git a/drivers/staging/hv/hv_util.c b/drivers/staging/hv/hv_util.c
index c164b54..2d672b8 100644
--- a/drivers/staging/hv/hv_util.c
+++ b/drivers/staging/hv/hv_util.c
@@ -26,8 +26,8 @@
#include <linux/slab.h>
#include <linux/sysctl.h>
#include <linux/reboot.h>
-#include <linux/dmi.h>
#include <linux/pci.h>
+#include <linux/sysfw.h>
#include "hyperv.h"
#include "hv_kvp.h"
@@ -218,19 +218,18 @@ hv_utils_pci_table[] __maybe_unused = {
MODULE_DEVICE_TABLE(pci, hv_utils_pci_table);
-static const struct dmi_system_id __initconst
-hv_utils_dmi_table[] __maybe_unused = {
+static const struct sysfw_id __initconst hv_utils_id_table[] __maybe_unused = {
{
.ident = "Hyper-V",
.matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
- DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"),
+ SYSFW_MATCH(SYSFW_SYS_VENDOR, "Microsoft Corporation"),
+ SYSFW_MATCH(SYSFW_PRODUCT_NAME, "Virtual Machine"),
+ SYSFW_MATCH(SYSFW_BOARD_NAME, "Virtual Machine"),
},
},
- { },
+ {},
};
-MODULE_DEVICE_TABLE(dmi, hv_utils_dmi_table);
+MODULE_DEVICE_TABLE(sysfw, hv_utils_id_table);
static int __init init_hyperv_utils(void)
@@ -241,7 +240,7 @@ static int __init init_hyperv_utils(void)
return -ENODEV;
- if (!dmi_check_system(hv_utils_dmi_table))
+ if (!sysfw_callback(hv_utils_id_table))
return -ENODEV;
shut_txf_buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 7b9c229..0ffc210 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -32,8 +32,8 @@
#include <linux/skbuff.h>
#include <linux/in.h>
#include <linux/slab.h>
-#include <linux/dmi.h>
#include <linux/pci.h>
+#include <linux/sysfw.h>
#include <net/arp.h>
#include <net/route.h>
#include <net/sock.h>
@@ -439,19 +439,18 @@ static void __exit netvsc_drv_exit(void)
}
-static const struct dmi_system_id __initconst
-hv_netvsc_dmi_table[] __maybe_unused = {
+static const struct sysfw_id __initconst hv_netvsc_id_table[] __maybe_unused = {
{
.ident = "Hyper-V",
.matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
- DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"),
+ SYSFW_MATCH(SYSFW_SYS_VENDOR, "Microsoft Corporation"),
+ SYSFW_MATCH(SYSFW_PRODUCT_NAME, "Virtual Machine"),
+ SYSFW_MATCH(SYSFW_BOARD_NAME, "Virtual Machine"),
},
},
- { },
+ {},
};
-MODULE_DEVICE_TABLE(dmi, hv_netvsc_dmi_table);
+MODULE_DEVICE_TABLE(sysfw, hv_netvsc_id_table);
static int __init netvsc_drv_init(void)
{
@@ -460,7 +459,7 @@ static int __init netvsc_drv_init(void)
pr_info("initializing....");
- if (!dmi_check_system(hv_netvsc_dmi_table))
+ if (!sysfw_callback(hv_netvsc_id_table))
return -ENODEV;
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index ec1d38c..18e3687 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -29,7 +29,6 @@
#include <linux/interrupt.h>
#include <linux/sysctl.h>
#include <linux/pci.h>
-#include <linux/dmi.h>
#include <linux/slab.h>
#include <linux/acpi.h>
#include <acpi/acpi_bus.h>
--
1.6.5.2
next prev parent reply other threads:[~2011-07-18 13:14 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 ` [PATCH 13/34] drivers/ide " Prarit Bhargava
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 ` Prarit Bhargava [this message]
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-26-git-send-email-prarit@redhat.com \
--to=prarit@redhat.com \
--cc=evel@driverdev.osuosl.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