From: Colin Leroy <[email-masked]>

This patch limits therm_adt746x to currently existing fan controllers in
Apple laptops.  It may avoid problems with future hardware.

Signed-off-by: Colin Leroy <[email-masked]>
Cc: Benjamin Herrenschmidt <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/macintosh/therm_adt746x.c |    6 ++++++
 1 files changed, 6 insertions(+)

diff -puN drivers/macintosh/therm_adt746x.c~make-sure-therm_adt746x-only-handles-known-hardware drivers/macintosh/therm_adt746x.c
--- 25/drivers/macintosh/therm_adt746x.c~make-sure-therm_adt746x-only-handles-known-hardware	2005-05-25 12:30:24.000000000 -0700
+++ 25-akpm/drivers/macintosh/therm_adt746x.c	2005-05-25 12:30:42.000000000 -0700
@@ -545,6 +545,12 @@ thermostat_init(void)
 	else
 		return -ENODEV;
 
+	prop = (u32 *)get_property(np, "hwsensor-params-version", NULL);
+	printk(KERN_INFO "adt746x: version %d (%ssupported)\n", *prop,
+			 (*prop == 1)?"":"un");
+	if (*prop != 1)
+		return -ENODEV;
+
 	prop = (u32 *)get_property(np, "reg", NULL);
 	if (!prop)
 		return -ENODEV;
_