From 9d1f8a40ddab65a5cedb69b369ee4c0c6e4acf6b Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Sat, 22 Jan 2011 20:55:39 +0100 Subject: [PATCH 1/3] hwmon: (applesmc) Properly initialize lockdep attributes The switch to dynamically allocated sysfs attributes left the internal lockdep members uninitialized, causing a formal bug. This patch adds sysfs_attr_init() to the node creation function, remedying the problem. Reported-and-tested-by: Stefan Richter Signed-off-by: Henrik Rydberg Signed-off-by: Guenter Roeck --- drivers/hwmon/applesmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index ce0372f0615..4c0743660e9 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -1072,6 +1072,7 @@ static int applesmc_create_nodes(struct applesmc_node_group *groups, int num) node->sda.dev_attr.show = grp->show; node->sda.dev_attr.store = grp->store; attr = &node->sda.dev_attr.attr; + sysfs_attr_init(attr); attr->name = node->name; attr->mode = S_IRUGO | (grp->store ? S_IWUSR : 0); ret = sysfs_create_file(&pdev->dev.kobj, attr); From 86ca33e82597c0aeb15fbdfb9619e86ef6b0f704 Mon Sep 17 00:00:00 2001 From: Luca Tettamanti Date: Sat, 22 Jan 2011 16:07:11 +0100 Subject: [PATCH 2/3] hwmon: (asus_atk0110) Override interface detection on Sabertooth X58 ASUS Sabertooth X58 has a bug in ACPI that prevents the reading of MCH temperature when the "old" ATK0110 interface is used. Add a DMI entry to override the detection heuristic and force the use of the "new" interface on this board. Signed-off-by: Luca Tettamanti Tested-by: Joris Creyghton Signed-off-by: Guenter Roeck --- drivers/hwmon/asus_atk0110.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index 2d68cf3c223..b5e892017e0 100644 --- a/drivers/hwmon/asus_atk0110.c +++ b/drivers/hwmon/asus_atk0110.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -22,6 +23,21 @@ #define ATK_HID "ATK0110" +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[] = { + { + /* Old interface has broken MCH temp monitoring */ + .ident = "Asus Sabertooth X58", + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "SABERTOOTH X58") + } + }, + { } +}; + /* Minimum time between readings, enforced in order to avoid * hogging the CPU. */ @@ -1302,7 +1318,9 @@ static int atk_probe_if(struct atk_data *data) * analysis of multiple DSDTs indicates that when both interfaces * are present the new one (GGRP/GITM) is not functional. */ - if (data->rtmp_handle && data->rvlt_handle && data->rfan_handle) + if (new_if) + dev_info(dev, "Overriding interface detection\n"); + if (data->rtmp_handle && data->rvlt_handle && data->rfan_handle && !new_if) data->old_interface = true; else if (data->enumerate_handle && data->read_handle && data->write_handle) @@ -1420,6 +1438,9 @@ static int __init atk0110_init(void) return -EBUSY; } + if (dmi_check_system(atk_force_new_if)) + new_if = true; + ret = acpi_bus_register_driver(&atk_driver); if (ret) pr_info("acpi_bus_register_driver failed: %d\n", ret); From a20f0bc10c47fcf62be027e1a50b62791052ab56 Mon Sep 17 00:00:00 2001 From: Kalhan Trisal Date: Tue, 25 Jan 2011 14:24:37 +0000 Subject: [PATCH 3/3] hwmon: (lis3) turn down the no IRQ message Turn down the no IRQ message - on some platforms that's a normal state of affairs. Signed-off-by: Kalhan Trisal Signed-off-by: Alan Cox Acked-by: Eric Piel Signed-off-by: Guenter Roeck --- drivers/hwmon/lis3lv02d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c index 1b674b7d458..d805e8e5796 100644 --- a/drivers/hwmon/lis3lv02d.c +++ b/drivers/hwmon/lis3lv02d.c @@ -957,7 +957,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) /* bail if we did not get an IRQ from the bus layer */ if (!dev->irq) { - pr_err("No IRQ. Disabling /dev/freefall\n"); + pr_debug("No IRQ. Disabling /dev/freefall\n"); goto out; }