[PATCH 2/4] backports: add resource_size()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/ioport.h |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/backport/backport-include/linux/ioport.h b/backport/backport-include/linux/ioport.h
index 3424401..b9aec4d 100644
--- a/backport/backport-include/linux/ioport.h
+++ b/backport/backport-include/linux/ioport.h
@@ -6,4 +6,11 @@
 #define IORESOURCE_REG		0x00000300
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+static inline resource_size_t resource_size(const struct resource *res)
+{
+	return res->end - res->start + 1;
+}
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) */
+
 #endif /* __BACKPORT_LINUX_IOPORT_H */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux