summaryrefslogtreecommitdiffstats
path: root/include/hardware/hardware.h
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2012-03-19 22:48:32 -0700
committerDima Zavin <dima@android.com>2012-03-20 12:30:20 -0700
commit8dc4e710c0dfa66564c8cea0af53f7b4e8e0f80a (patch)
tree8e168bad85c899f32cc3f240fa5f1bd80f7e8e32 /include/hardware/hardware.h
parent2b57780d88e32ce9fde32dc085aef2fa7fd478e1 (diff)
downloadhardware_libhardware-8dc4e710c0dfa66564c8cea0af53f7b4e8e0f80a.zip
hardware_libhardware-8dc4e710c0dfa66564c8cea0af53f7b4e8e0f80a.tar.gz
hardware_libhardware-8dc4e710c0dfa66564c8cea0af53f7b4e8e0f80a.tar.bz2
hardware: provide temp version defines for source compatibility
This allows all the existing modules to have source level compatibility until they are fixed to use the new field names. Since the binary compatibility has not been altered, we do not need to force all the implementors to rev their version numbers. This change should be reverted when all the clients have been updated. Change-Id: Ie543d3a972d8abe03ca5123e3000966f048d1771 Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'include/hardware/hardware.h')
-rw-r--r--include/hardware/hardware.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/hardware/hardware.h b/include/hardware/hardware.h
index db6640d..3d341c8 100644
--- a/include/hardware/hardware.h
+++ b/include/hardware/hardware.h
@@ -69,6 +69,12 @@ typedef struct hw_module_t {
* versions outside of the supplied range.
*/
uint16_t module_api_version;
+#define version_major module_api_version
+ /**
+ * version_major/version_minor defines are supplied here for temporary
+ * source code compatibility. They will be removed in the next version.
+ * ALL clients must convert to the new version format.
+ */
/**
* The API version of the HAL module interface. This is meant to
@@ -81,6 +87,7 @@ typedef struct hw_module_t {
* Presently, 0 is the only valid value.
*/
uint16_t hal_api_version;
+#define version_minor hal_api_version
/** Identifier of module */
const char *id;