aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/therm_adt746x.c
diff options
context:
space:
mode:
authorColin Leroy <colin@colino.net>2005-05-25 15:31:34 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-25 18:31:29 -0400
commita8bacec09352b86bd389cc93a20008577fa14764 (patch)
tree608170ccc532ea2b96f1a5f073ae154cb8ce80fc /drivers/macintosh/therm_adt746x.c
parent3bf4fb820d7382318d178bd765c20028415466ab (diff)
[PATCH] Make sure therm_adt746x only handles known hardware
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 <colin@colino.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/macintosh/therm_adt746x.c')
-rw-r--r--drivers/macintosh/therm_adt746x.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index e0ac63effa55..c7e84abe8951 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -545,6 +545,12 @@ thermostat_init(void)
545 else 545 else
546 return -ENODEV; 546 return -ENODEV;
547 547
548 prop = (u32 *)get_property(np, "hwsensor-params-version", NULL);
549 printk(KERN_INFO "adt746x: version %d (%ssupported)\n", *prop,
550 (*prop == 1)?"":"un");
551 if (*prop != 1)
552 return -ENODEV;
553
548 prop = (u32 *)get_property(np, "reg", NULL); 554 prop = (u32 *)get_property(np, "reg", NULL);
549 if (!prop) 555 if (!prop)
550 return -ENODEV; 556 return -ENODEV;