* [PATCH] powerpc: pmac_feature_call checks platform
@ 2006-11-01 4:53 Benjamin Herrenschmidt
0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2006-11-01 4:53 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
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 powermac machines.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/include/asm-powerpc/pmac_feature.h
===================================================================
--- linux-work.orig/include/asm-powerpc/pmac_feature.h 2006-09-08 17:17:52.000000000 +1000
+++ linux-work/include/asm-powerpc/pmac_feature.h 2006-11-01 14:34:13.000000000 +1100
@@ -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);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-11-01 5:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-01 4:53 [PATCH] powerpc: pmac_feature_call checks platform Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).