diff options
author | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-07-19 02:53:01 +0000 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-07-19 15:05:32 -0700 |
commit | ce08ade9175edf03f29d98a9407bcc6b093dbead (patch) | |
tree | 1f29e712c88430cfe6da74fc2925d5e4e28a37b5 /backport | |
parent | e2d5a26742e025ec4e24129c132589ec3b491eb4 (diff) |
backports: simplify swiotlb_nr_tbl() backport
swiotlb_nr_tbl() was available since 3.2 but was exported since 3.3.
Since it uses an internal global state variable, it is impossible
to backport it to. Instead of reverting the changes added just
let this return 0 as the code will not do anything. This simplifies
the backport.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Diffstat (limited to 'backport')
-rw-r--r-- | backport/backport-include/linux/swiotlb.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/backport/backport-include/linux/swiotlb.h b/backport/backport-include/linux/swiotlb.h new file mode 100644 index 00000000..836b3538 --- /dev/null +++ b/backport/backport-include/linux/swiotlb.h @@ -0,0 +1,17 @@ +#ifndef __BACKPORT_LINUX_SWIOTLB_H +#define __BACKPORT_LINUX_SWIOTLB_H + +#include <linux/version.h> + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) +#include_next <linux/swiotlb.h> +#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) */ + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) +static inline unsigned long swiotlb_nr_tbl(void) +{ + return 0; +} +#endif + +#endif /* __BACKPORT_LINUX_SWIOTLB_H */ |