summaryrefslogtreecommitdiff
path: root/include/mtdev-mapping.h
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-12-22 18:29:00 +0100
committerHenrik Rydberg <rydberg@euromail.se>2010-12-22 18:29:00 +0100
commit56a77e68fb91eef928d8a95c50ae14508e37ae0f (patch)
tree51af9bb9dd508bca58e8b9416479e79f8bb7ee10 /include/mtdev-mapping.h
parent0e2ab3b5940e70493aaabdfe5e8da1c75db4db72 (diff)
downloadmtdev-git-56a77e68fb91eef928d8a95c50ae14508e37ae0f.tar.gz
Introduce a stable ABI
The current mtdev is not ABI stable, and the upcoming additions to the kernel api will break ABI. This patch starts the process of keeping binary compatibility with old programs, by moving the abi-specific parts under a special flag, MTDEV_NO_LEGACY_API, and makes sure the internal parts compiles with MTDEV_NO_LEGACY_API set. This way, older programs will still work, old programs will still compile, and new programs will be able to use the additions. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'include/mtdev-mapping.h')
-rw-r--r--include/mtdev-mapping.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mtdev-mapping.h b/include/mtdev-mapping.h
index 0e47970..0cdb39d 100644
--- a/include/mtdev-mapping.h
+++ b/include/mtdev-mapping.h
@@ -37,6 +37,8 @@ extern "C" {
#include <mtdev.h>
+#ifndef MTDEV_NO_LEGACY_API
+
#define MTDEV_TOUCH_MAJOR 0
#define MTDEV_TOUCH_MINOR 1
#define MTDEV_WIDTH_MAJOR 2
@@ -80,6 +82,8 @@ static inline unsigned int mtdev_mt2abs(unsigned int mtcode)
return mtdev_map_mt2abs[mtcode];
}
+#endif
+
#ifdef __cplusplus
}
#endif