Skip to content

Commit

Permalink
[PATCH] Make sure therm_adt746x only handles known hardware
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Leroy authored and Linus Torvalds committed May 25, 2005
1 parent 3bf4fb8 commit a8bacec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/macintosh/therm_adt746x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a8bacec

Please sign in to comment.