Skip to content

Commit

Permalink
[POWERPC] pmac_feature_call checks platform
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
  • Loading branch information
ozbenh authored and paulusmack committed May 2, 2007
1 parent dc87c39 commit 0eb2e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-powerpc/pmac_feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0eb2e60

Please sign in to comment.