[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>

authored by Colin Leroy and committed by Linus Torvalds a8bacec0 3bf4fb82

+6
+6
drivers/macintosh/therm_adt746x.c
··· 545 545 else 546 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 554 prop = (u32 *)get_property(np, "reg", NULL); 549 555 if (!prop) 550 556 return -ENODEV;