summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-06-25 13:06:03 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-06-25 14:45:43 +0200
commit2ca512e5923bb2d66a13211af9401c53735052b2 (patch)
tree77a53d8e7ddfc7a32447bd925e70f6216f8aef17 /include
parent53e9fae78c2fb1824c4d9cdbf6bd418e3325d2a9 (diff)
downloadbarebox-2ca512e5923bb2d66a13211af9401c53735052b2.tar.gz
barebox-2ca512e5923bb2d66a13211af9401c53735052b2.tar.xz
print out resource_size_t correctly
resource_size_t can be 32bit or 64bit depending on the architecture. Add a define for it to be able to printf a resource_size_t correctly Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ioport.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index c837b5349..3f95dddf4 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -25,6 +25,12 @@ struct resource {
struct list_head sibling;
};
+#ifdef CONFIG_PHYS_ADDR_T_64BIT
+#define PRINTF_CONVERSION_RESOURCE "0x%016llx"
+#else
+#define PRINTF_CONVERSION_RESOURCE "0x%08x"
+#endif
+
/*
* IO resources have these defined flags.
*/