dect
/
linux-2.6
Archived
13
0
Fork 0

[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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Benjamin Herrenschmidt 2006-11-01 15:53:00 +11:00 committed by Paul Mackerras
parent dc87c3985e
commit 0eb2e6019a
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ struct device_node;
static inline long pmac_call_feature(int selector, struct device_node* node,
long param, long value)
{
if (!ppc_md.feature_call)
if (!ppc_md.feature_call || !machine_is(powermac))
return -ENODEV;
return ppc_md.feature_call(selector, node, param, value);
}