From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: LM Sensors <lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>
Cc: Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Sergey Spiridonov
<sena-1VtuP/tG+VlxJOgadfisgdi2O/JbrIOy@public.gmane.org>,
Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH] hwmon: Fix autoloading of fschmd on recent Fujitsu machines
Date: Thu, 8 Jul 2010 18:07:43 +0200 [thread overview]
Message-ID: <20100708180743.4661c26d@hyperion.delvare> (raw)
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-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Tested-by: Sergey Spiridonov <sena-1VtuP/tG+VlxJOgadfisgdi2O/JbrIOy@public.gmane.org>
Cc: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
drivers/i2c/busses/i2c-i801.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
--- linux-2.6.35-rc4.orig/drivers/i2c/busses/i2c-i801.c 2010-07-07 15:00:17.000000000 +0200
+++ linux-2.6.35-rc4/drivers/i2c/busses/i2c-i801.c 2010-07-08 18:00:51.000000000 +0200
@@ -655,7 +655,7 @@ static void __devinit dmi_check_onboard_
/* & ~0x80, ignore enabled/disabled bit */
if ((type & ~0x80) != dmi_devices[i].type)
continue;
- if (strcmp(name, dmi_devices[i].name))
+ if (strcasecmp(name, dmi_devices[i].name))
continue;
memset(&info, 0, sizeof(struct i2c_board_info));
@@ -704,9 +704,6 @@ static int __devinit i801_probe(struct p
{
unsigned char temp;
int err, i;
-#if defined CONFIG_SENSORS_FSCHMD || defined CONFIG_SENSORS_FSCHMD_MODULE
- const char *vendor;
-#endif
I801_dev = dev;
i801_features = 0;
@@ -808,8 +805,7 @@ static int __devinit i801_probe(struct p
}
#endif
#if defined CONFIG_SENSORS_FSCHMD || defined CONFIG_SENSORS_FSCHMD_MODULE
- vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
- if (vendor && !strcmp(vendor, "FUJITSU SIEMENS"))
+ if (dmi_name_in_vendors("FUJITSU"))
dmi_walk(dmi_check_onboard_devices, &i801_adapter);
#endif
--
Jean Delvare
next reply other threads:[~2010-07-08 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-08 16:07 Jean Delvare [this message]
[not found] ` <20100708180743.4661c26d-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-07-10 20:47 ` [PATCH] hwmon: Fix autoloading of fschmd on recent Fujitsu machines Hans de Goede
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=20100708180743.4661c26d@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
--cc=sena-1VtuP/tG+VlxJOgadfisgdi2O/JbrIOy@public.gmane.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;
as well as URLs for NNTP newsgroup(s).