Revert "hwmon: (sch56xx-common) Add DMI override table"
Guenter Roeck
maintainerPATCH 1/2 Revert "hwmon: (sch56xx-common) Add DMI override table"
This reverts commit fd2d53c367ae9983c2100ac733a834e0c79d7537.
As reported by Ian Nartowicz, this and the preceding patch result in a failure to load the driver on Celsius W280. While the alternative would be to add the board to the DMI override table, it is quite likely that other systems are also affected. Revert the offending patches to avoid future problems.
--- drivers/hwmon/sch56xx-common.c | 44 ++++++++-------------------------- 1 file changed, 10 insertions(+), 34 deletions(-)
drivers/hwmon/sch56xx-common.c +10 -34
@@ -523,28 +523,6 @@ static int __init sch56xx_device_add(int address, const char *name)return PTR_ERR_OR_ZERO (sch56xx_pdev); } -static const struct dmi_system_id sch56xx_dmi_override_table[]__initconst = { - { - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"FUJITSU" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"CELSIUS W380" ), - }, - }, - { - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"FUJITSU" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"ESPRIMO P710" ), - }, - }, - { - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"FUJITSU" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"ESPRIMO E9900" ), - }, - }, - { } -}; -/* For autoloading only */ static const struct dmi_system_id sch56xx_dmi_table[]__initconst = { {
@@ -565,18 +543,16 @@ static int __init sch56xx_init(void)if (!dmi_check_system (sch56xx_dmi_table))return -ENODEV ; -if (!dmi_check_system (sch56xx_dmi_override_table)) { -/* -* Some machines like the Esprimo P720 and Esprimo C700 have -* onboard devices named " Antiope"/" Theseus" instead of -* "Antiope"/"Theseus", so we need to check for both. -*/ -if (!dmi_find_device (DMI_DEV_TYPE_OTHER ,"Antiope" ,NULL ) && - !dmi_find_device (DMI_DEV_TYPE_OTHER ," Antiope" ,NULL ) && - !dmi_find_device (DMI_DEV_TYPE_OTHER ,"Theseus" ,NULL ) && - !dmi_find_device (DMI_DEV_TYPE_OTHER ," Theseus" ,NULL )) -return -ENODEV ; - } +/* +* Some machines like the Esprimo P720 and Esprimo C700 have +* onboard devices named " Antiope"/" Theseus" instead of +* "Antiope"/"Theseus", so we need to check for both. +*/ +if (!dmi_find_device (DMI_DEV_TYPE_OTHER ,"Antiope" ,NULL ) && + !dmi_find_device (DMI_DEV_TYPE_OTHER ," Antiope" ,NULL ) && + !dmi_find_device (DMI_DEV_TYPE_OTHER ,"Theseus" ,NULL ) && + !dmi_find_device (DMI_DEV_TYPE_OTHER ," Theseus" ,NULL )) +return -ENODEV ; }/*
Signature · 1 line
2.39.2
Guenter Roeck
maintainerPATCH 2/2 Revert "hwmon: (sch56xx-common) Add automatic module loading on supported devices"
This reverts commit 393935baa45e5ccb9603cf7f9f020ed1bc0915f7.
As reported by Ian Nartowicz, this and the next patch result in a failure to load the driver on Celsius W280. While the alternative would be to add the board to the DMI override table, it is quite likely that other systems are also affected. Revert the offending patches to avoid future problems.
--- drivers/hwmon/sch56xx-common.c | 40 ++-------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-)
drivers/hwmon/sch56xx-common.c +2 -38
@@ -7,10 +7,8 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/module.h> -#include <linux/mod_devicetable.h> #include <linux/init.h> #include <linux/platform_device.h> -#include <linux/dmi.h> #include <linux/err.h> #include <linux/io.h> #include <linux/acpi.h>
@@ -21,10 +19,7 @@#include <linux/slab.h> #include "sch56xx-common.h" -static bool ignore_dmi; -module_param (ignore_dmi, bool,0 ); -MODULE_PARM_DESC (ignore_dmi,"Omit DMI check for supported devices (default=0)" ); - +/* Insmod parameters */ static bool nowayout =WATCHDOG_NOWAYOUT ;module_param (nowayout, bool,0 ); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
@@ -523,42 +518,11 @@ static int __init sch56xx_device_add(int address, const char *name)return PTR_ERR_OR_ZERO (sch56xx_pdev); } -/* For autoloading only */ -static const struct dmi_system_id sch56xx_dmi_table[]__initconst = { - { - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"FUJITSU" ), - }, - }, - { } -}; -MODULE_DEVICE_TABLE (dmi, sch56xx_dmi_table); -static int __init sch56xx_init (void ) { -const char *name =NULL ;int address; +const char *name =NULL ; -if (!ignore_dmi) { -if (!dmi_check_system (sch56xx_dmi_table)) -return -ENODEV ; - -/* -* Some machines like the Esprimo P720 and Esprimo C700 have -* onboard devices named " Antiope"/" Theseus" instead of -* "Antiope"/"Theseus", so we need to check for both. -*/ -if (!dmi_find_device (DMI_DEV_TYPE_OTHER ,"Antiope" ,NULL ) && - !dmi_find_device (DMI_DEV_TYPE_OTHER ," Antiope" ,NULL ) && - !dmi_find_device (DMI_DEV_TYPE_OTHER ,"Theseus" ,NULL ) && - !dmi_find_device (DMI_DEV_TYPE_OTHER ," Theseus" ,NULL )) -return -ENODEV ; - } - -/* -* Some devices like the Esprimo C700 have both onboard devices, -* so we still have to check manually -*/ address =sch56xx_find (0x4e , &name);if (address <0 ) address =sch56xx_find (0x2e , &name);
Signature · 1 line
2.39.2