]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/kdebugfs.c
Merge branches 'sched/devel', 'sched/cpu-hotplug', 'sched/cpusets' and 'sched/urgent...
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / kdebugfs.c
index c03205991718b30da8adfed31d915f7f325b2aa0..ff7d3b0124f1db07bbb0750ec0fe0e9237f66574 100644 (file)
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/mm.h>
+#include <linux/module.h>
 
 #include <asm/setup.h>
 
+struct dentry *arch_debugfs_dir;
+EXPORT_SYMBOL(arch_debugfs_dir);
+
 #ifdef CONFIG_DEBUG_BOOT_PARAMS
 struct setup_data_node {
        u64 paddr;
@@ -135,6 +139,7 @@ static int __init create_setup_data_nodes(struct dentry *parent)
                if (PageHighMem(pg)) {
                        data = ioremap_cache(pa_data, sizeof(*data));
                        if (!data) {
+                               kfree(node);
                                error = -ENXIO;
                                goto err_dir;
                        }
@@ -209,6 +214,10 @@ static int __init arch_kdebugfs_init(void)
 {
        int error = 0;
 
+       arch_debugfs_dir = debugfs_create_dir("x86", NULL);
+       if (!arch_debugfs_dir)
+               return -ENOMEM;
+
 #ifdef CONFIG_DEBUG_BOOT_PARAMS
        error = boot_params_kdebugfs_init();
 #endif