diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-10-31 23:53:00 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-02 02:35:01 -0400 |
commit | 0eb2e6019ae8e76a537bdca07b31e1524a3bba48 (patch) | |
tree | a4391fefdd01688049b5a3ce6068d4e2bfa35b5a | |
parent | dc87c3985e9b442c60994308a96f887579addc39 (diff) |
[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>
-rw-r--r-- | include/asm-powerpc/pmac_feature.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-powerpc/pmac_feature.h b/include/asm-powerpc/pmac_feature.h index d3599cc9aa74..d43d91beba9b 100644 --- a/include/asm-powerpc/pmac_feature.h +++ b/include/asm-powerpc/pmac_feature.h | |||
@@ -146,7 +146,7 @@ struct device_node; | |||
146 | static inline long pmac_call_feature(int selector, struct device_node* node, | 146 | static inline long pmac_call_feature(int selector, struct device_node* node, |
147 | long param, long value) | 147 | long param, long value) |
148 | { | 148 | { |
149 | if (!ppc_md.feature_call) | 149 | if (!ppc_md.feature_call || !machine_is(powermac)) |
150 | return -ENODEV; | 150 | return -ENODEV; |
151 | return ppc_md.feature_call(selector, node, param, value); | 151 | return ppc_md.feature_call(selector, node, param, value); |
152 | } | 152 | } |