Commit:     0eb2e6019ae8e76a537bdca07b31e1524a3bba48
Parent:     dc87c3985e9b442c60994308a96f887579addc39
Author:     Benjamin Herrenschmidt <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 1 15:53:00 2006 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed May 2 16:35:01 2007 +1000

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 include/asm-powerpc/pmac_feature.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-powerpc/pmac_feature.h 
index d3599cc..d43d91b 100644
--- a/include/asm-powerpc/pmac_feature.h
+++ b/include/asm-powerpc/pmac_feature.h
@@ -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);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to