提交 0eb2e601 编写于 作者: B Benjamin Herrenschmidt 提交者: Paul Mackerras

[POWERPC] pmac_feature_call checks platform

This patch makes sure that a caller of pmac_call_feature() won't try
to call into ppc_md.feature_call of another platform, which might
happen if some powermac drivers are loaded on non-powermac machines.
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 dc87c398
...@@ -146,7 +146,7 @@ struct device_node; ...@@ -146,7 +146,7 @@ struct device_node;
static inline long pmac_call_feature(int selector, struct device_node* node, static inline long pmac_call_feature(int selector, struct device_node* node,
long param, long value) long param, long value)
{ {
if (!ppc_md.feature_call) if (!ppc_md.feature_call || !machine_is(powermac))
return -ENODEV; return -ENODEV;
return ppc_md.feature_call(selector, node, param, value); return ppc_md.feature_call(selector, node, param, value);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册