Skip to contentSkip to conversation

drivers/hwmon changes for SMBIOS and System Firmware

RFC PATCH In review Prarit Bhargava 1 participant 1 message May 31, 2011

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 11/35 drivers/hwmon changes for SMBIOS and System Firmware

drivers/hwmon changes for SMBIOS and System Firmware

---
 drivers/hwmon/abituguru.c    |   18 ++++++--
 drivers/hwmon/abituguru3.c   |   75 ++++++++++++++++--------------
 drivers/hwmon/adcxx.c        |    1 -
 drivers/hwmon/applesmc.c     |   73 +++++++++++++++++------------
 drivers/hwmon/asus_atk0110.c |    8 ++--
 drivers/hwmon/fschmd.c       |  104 ++++++++++++++++++++++--------------------
 drivers/hwmon/it87.c         |   42 ++++++++++-------
 drivers/hwmon/lm70.c         |    1 -
 8 files changed, 180 insertions(+), 142 deletions(-)
drivers/hwmon/abituguru.c +14 -4
index 65a35cf..b9053cb 100644
@@ -34,7 +34,7 @@
 #include <linux/platform_device.h>
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
-#include <linux/dmi.h>
+#include <linux/sysfw.h>
 #include <linux/io.h>
 
 /* Banks */
@@ -1444,15 +1444,25 @@ static int __init abituguru_detect(void)
 
 static struct platform_device *abituguru_pdev;
 
+static struct sysfw_id abitguru_id_table[] = {
+	{
+		 .ident = "Abit Motherboards",
+		.matches = {
+			SYSFW_MATCH(SYSFW_BOARD_VENDOR,
+				    "http://www.abit.com.tw/"),
+		},
+		.exactmatch = 1,
+	},
+	{},
+};
+
 static int __init abituguru_init(void)
 {
 	int address, err;
 	struct resource res = { .flags = IORESOURCE_IO };
-	const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
 
 	/* safety check, refuse to load on non Abit motherboards */
-	if (!force && (!board_vendor ||
-			strcmp(board_vendor, "http://www.abit.com.tw/")))
+	if (!force && !sysfw_callback(abitguru_id_table))
 		return -ENODEV;
 
 	address = abituguru_detect();
drivers/hwmon/abituguru3.c +41 -34

191 lines not on this page · raw message

drivers/hwmon/adcxx.c +0 -1
index b2cacbe..ff47453 100644
@@ -44,7 +44,6 @@
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
 #include <linux/mutex.h>
-#include <linux/mod_devicetable.h>
 #include <linux/spi/spi.h>
 
 #define DRVNAME		"adcxx"
drivers/hwmon/applesmc.c +43 -30

100 lines not on this page · raw message

drivers/hwmon/asus_atk0110.c +4 -4
index b5e8920..2247b7b 100644
@@ -13,7 +13,7 @@
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/slab.h>
-#include <linux/dmi.h>
+#include <linux/sysfw.h>
 
 #include <acpi/acpi.h>
 #include <acpi/acpixf.h>
@@ -27,12 +27,12 @@ static bool new_if;
 module_param(new_if, bool, 0);
 MODULE_PARM_DESC(new_if, "Override detection heuristic and force the use of the new ATK0110 interface");
 
-static const struct dmi_system_id __initconst atk_force_new_if[] = {
+static const struct sysfw_id __initconst atk_force_new_if[] = {
 	{
 		/* Old interface has broken MCH temp monitoring */
 		.ident = "Asus Sabertooth X58",
 		.matches = {
-			DMI_MATCH(DMI_BOARD_NAME, "SABERTOOTH X58")
+			SYSFW_MATCH(SYSFW_BOARD_NAME, "SABERTOOTH X58")
 		}
 	},
 	{ }
@@ -1438,7 +1438,7 @@ static int __init atk0110_init(void)
 		return -EBUSY;
 	}
 
-	if (dmi_check_system(atk_force_new_if))
+	if (sysfw_callback(atk_force_new_if))
 		new_if = true;
 
 	ret = acpi_bus_register_driver(&atk_driver);
drivers/hwmon/fschmd.c +54 -50

171 lines not on this page · raw message

drivers/hwmon/it87.c +24 -18

72 lines not on this page · raw message

drivers/hwmon/lm70.c +0 -1
index c274ea2..bdb34f8 100644
@@ -34,7 +34,6 @@
 #include <linux/sysfs.h>
 #include <linux/hwmon.h>
 #include <linux/mutex.h>
-#include <linux/mod_devicetable.h>
 #include <linux/spi/spi.h>
 #include <linux/slab.h>
 
Signature · 1 line
1.7.5.1