Skip to content

Commit faabd47

Browse files
author
Jean Delvare
committed
hwmon: Fix autoloading of fschmd on recent Fujitsu machines
Fujitsu slightly changed the DMI strings in their recent machines, (for example the D2778) and this breaks the automatic loading of the needed fschmd driver. Being more tolerant on string comparison fixes the issue. This closes bug #15634: https://bugzilla.kernel.org/show_bug.cgi?id=15634 Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Sergey Spiridonov <sena@hurd.homeunix.org> Cc: Hans de Goede <hdegoede@redhat.com>
1 parent 3f4f09b commit faabd47

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎drivers/i2c/busses/i2c-i801.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ static void __devinit dmi_check_onboard_device(u8 type, const char *name,
655655
/* & ~0x80, ignore enabled/disabled bit */
656656
if ((type & ~0x80) != dmi_devices[i].type)
657657
continue;
658-
if (strcmp(name, dmi_devices[i].name))
658+
if (strcasecmp(name, dmi_devices[i].name))
659659
continue;
660660

661661
memset(&info, 0, sizeof(struct i2c_board_info));
@@ -704,9 +704,6 @@ static int __devinit i801_probe(struct pci_dev *dev,
704704
{
705705
unsigned char temp;
706706
int err, i;
707-
#if defined CONFIG_SENSORS_FSCHMD || defined CONFIG_SENSORS_FSCHMD_MODULE
708-
const char *vendor;
709-
#endif
710707

711708
I801_dev = dev;
712709
i801_features = 0;
@@ -808,8 +805,7 @@ static int __devinit i801_probe(struct pci_dev *dev,
808805
}
809806
#endif
810807
#if defined CONFIG_SENSORS_FSCHMD || defined CONFIG_SENSORS_FSCHMD_MODULE
811-
vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
812-
if (vendor && !strcmp(vendor, "FUJITSU SIEMENS"))
808+
if (dmi_name_in_vendors("FUJITSU"))
813809
dmi_walk(dmi_check_onboard_devices, &i801_adapter);
814810
#endif
815811

0 commit comments

Comments
 (0)