summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsynergy dev <synergye@codefi.re>2013-11-04 20:13:47 -0800
committersynergy dev <synergye@codefi.re>2013-11-04 23:52:46 -0800
commit85d3473b2b6814a7f0d47cccae0c1af86cc53a9e (patch)
tree02508c4daeb8763590a904c6a2a20892b5b73b2d
parent6da5f1825c575f5b4751de0cb83c7d56e1242c66 (diff)
downloadakm-85d3473b2b6814a7f0d47cccae0c1af86cc53a9e.tar.gz
libsensors: do not use GNU old-style field designators
Avoiding the use of GNU extensions improves portability Change-Id: Ie7eadd940839d9b56dba5bfe719eca76c2a721b5
-rw-r--r--AK8975_FS/libsensors/sensors.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/AK8975_FS/libsensors/sensors.cpp b/AK8975_FS/libsensors/sensors.cpp
index 68be4fb..e37adc8 100644
--- a/AK8975_FS/libsensors/sensors.cpp
+++ b/AK8975_FS/libsensors/sensors.cpp
@@ -98,27 +98,27 @@ static int open_sensors(const struct hw_module_t* module, const char* id,
struct hw_device_t** device);
static int sensors__get_sensors_list(struct sensors_module_t* module,
- struct sensor_t const** list)
+ struct sensor_t const** list)
{
*list = sSensorList;
return ARRAY_SIZE(sSensorList);
}
static struct hw_module_methods_t sensors_module_methods = {
- open: open_sensors
+ .open = open_sensors
};
struct sensors_module_t HAL_MODULE_INFO_SYM = {
- common: {
- tag: HARDWARE_MODULE_TAG,
- version_major: 1,
- version_minor: 0,
- id: SENSORS_HARDWARE_MODULE_ID,
- name: "AKM Sensor module",
- author: "Asahi Kasei Microdevices",
- methods: &sensors_module_methods,
+ .common = {
+ .tag = HARDWARE_MODULE_TAG,
+ .version_major = 1,
+ .version_minor = 0,
+ .id = SENSORS_HARDWARE_MODULE_ID,
+ .name = "AKM Sensor module",
+ .author = "Asahi Kasei Microdevices",
+ .methods = &sensors_module_methods,
},
- get_sensors_list: sensors__get_sensors_list,
+ .get_sensors_list = sensors__get_sensors_list,
};
struct sensors_poll_context_t {
@@ -145,7 +145,7 @@ private:
int mWritePipeFd;
SensorBase* mSensors[numSensorDrivers];
- /* These function will be different depends on
+ /* These function will be different depends on
* which sensor is implemented in AKMD program.
*/
int handleToDriver(int handle);
@@ -266,7 +266,7 @@ int sensors_poll_context_t::setDelay_sub(int handle, int64_t ns) {
/* has dependencies, choose shorter interval */
if (cur > ns) {
err = mSensors[drv]->setDelay(handle, ns);
- }
+ }
}
return err;
}