tools headers UAPI: Sync openat2.h with the kernel sources
[linux-2.6-microblaze.git] / kernel / kallsyms.c
index fe9de06..8043a90 100644 (file)
@@ -177,6 +177,11 @@ unsigned long kallsyms_lookup_name(const char *name)
        return module_kallsyms_lookup_name(name);
 }
 
+#ifdef CONFIG_LIVEPATCH
+/*
+ * Iterate over all symbols in vmlinux.  For symbols from modules use
+ * module_kallsyms_on_each_symbol instead.
+ */
 int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
                                      unsigned long),
                            void *data)
@@ -192,8 +197,9 @@ int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
                if (ret != 0)
                        return ret;
        }
-       return module_kallsyms_on_each_symbol(fn, data);
+       return 0;
 }
+#endif /* CONFIG_LIVEPATCH */
 
 static unsigned long get_symbol_pos(unsigned long addr,
                                    unsigned long *symbolsize,