context_hub: Fix version defines
We're defining the version of a hardware module (hw_module_t), not a hardware device (hw_device_t). Thus, we only have 16 bits for our version number, instead of 32, and need to use the HARDWARE_DEVICE_API_VERSION macro. Additionally, for the CONTEXT_HUB_DEVICE_API_VERSION_1_0 define, which has 1 and 0 hard-coded in the name itself, we hard code 1 and 0 within its definition. We create CONTEXT_HUB_DEVICE_API_VERSION which will change as we update the major and minor version numbers in this header. Bug: 27798362 Change-Id: I58b9751dfb1989fd6bb7fbfc01329494cd88130c
This commit is contained in:
parent
45e2e5fc17
commit
5600a6a14c
1 changed files with 7 additions and 2 deletions
|
@ -46,8 +46,13 @@ __BEGIN_DECLS
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define CONTEXT_HUB_HEADER_VERSION 1
|
||||
#define CONTEXT_HUB_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION_2(1, 0, CONTEXT_HUB_HEADER_VERSION)
|
||||
#define CONTEXT_HUB_HEADER_MAJOR_VERSION 1
|
||||
#define CONTEXT_HUB_HEADER_MINOR_VERSION 0
|
||||
#define CONTEXT_HUB_DEVICE_API_VERSION \
|
||||
HARDWARE_DEVICE_API_VERSION(CONTEXT_HUB_HEADER_MAJOR_VERSION, \
|
||||
CONTEXT_HUB_HEADER_MINOR_VERSION)
|
||||
|
||||
#define CONTEXT_HUB_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION(1, 0)
|
||||
|
||||
/**
|
||||
* The id of this module
|
||||
|
|
Loading…
Reference in a new issue