提交 a8bacec0 编写于 作者: C Colin Leroy 提交者: Linus Torvalds

[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: NColin Leroy <colin@colino.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 3bf4fb82
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册