Skip to content

Commit

Permalink
debugfs: add missing #ifdef HAS_IOMEM
Browse files Browse the repository at this point in the history
"debugfs: add tools to printk 32-bit registers" adds new functions which rely
on IOMEM functionality which is not present on all architectures and therefore
result in compile errors:

fs/debugfs/file.c: In function 'debugfs_print_regs32':
fs/debugfs/file.c:561:7: error: implicit declaration of function 'readl' [-Werror=implicit-function-declaration]

Add an #ifdef CONFIG_HAS_IOMEM to fix this

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Heiko Carstens authored and Greg Kroah-Hartman committed Jan 4, 2012
1 parent a87b5b1 commit 3b85e4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/debugfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,8 @@ struct dentry *debugfs_create_blob(const char *name, mode_t mode,
}
EXPORT_SYMBOL_GPL(debugfs_create_blob);

#ifdef CONFIG_HAS_IOMEM

/*
* The regset32 stuff is used to print 32-bit registers using the
* seq_file utilities. We offer printing a register set in an already-opened
Expand Down Expand Up @@ -616,3 +618,5 @@ struct dentry *debugfs_create_regset32(const char *name, mode_t mode,
return debugfs_create_file(name, mode, parent, regset, &fops_regset32);
}
EXPORT_SYMBOL_GPL(debugfs_create_regset32);

#endif /* CONFIG_HAS_IOMEM */

0 comments on commit 3b85e4a

Please sign in to comment.