diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-09-06 08:11:03 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-09-06 08:11:03 +0000 |
commit | 707e3a8cd4ccdc51e45c4dbcd9c10bed02d5afb3 (patch) | |
tree | d1e42d241977f5ffc731ab153c752cc97c2b2449 | |
parent | 99e8b227cd00678ce863c04ebde0b8d9a6f7df5c (diff) | |
parent | 08c0e32e9b22fe46fd960773d0789048319655de (diff) | |
download | akm-707e3a8cd4ccdc51e45c4dbcd9c10bed02d5afb3.tar.gz |
release-request-f7e8a600-b041-4cd7-94a0-d043d188195c-for-git_pi-release-4318525 snap-temp-L60300000099762192
Change-Id: I7df01d7cdee1a20c1f916ff51442a8fbc34e313a
-rw-r--r-- | AK8975_FS/akmdfs/AKFS_Measure.c | 6 | ||||
-rw-r--r-- | AK8975_FS/libsensors/AkmSensor.cpp | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/AK8975_FS/akmdfs/AKFS_Measure.c b/AK8975_FS/akmdfs/AKFS_Measure.c index 849c921..efb73f4 100644 --- a/AK8975_FS/akmdfs/AKFS_Measure.c +++ b/AK8975_FS/akmdfs/AKFS_Measure.c @@ -16,6 +16,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +#include <inttypes.h> + #ifdef WIN32 #include "AK8975_LinuxDriver.h" #else @@ -207,7 +210,8 @@ int16 AKFS_GetInterval( AKMERROR; return AKM_FAIL; } - AKMDATA(AKMDATA_GETINTERVAL,"delay[A,M,O]=%lld,%lld,%lld\n", + AKMDATA(AKMDATA_GETINTERVAL, + "delay[A,M,O]=%" PRIi64 ",%" PRIi64 ",%" PRIi64 "\n", delay[0], delay[1], delay[2]); /* update */ diff --git a/AK8975_FS/libsensors/AkmSensor.cpp b/AK8975_FS/libsensors/AkmSensor.cpp index bcbd445..3351fbf 100644 --- a/AK8975_FS/libsensors/AkmSensor.cpp +++ b/AK8975_FS/libsensors/AkmSensor.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#include <inttypes.h> #include <fcntl.h> #include <errno.h> #include <math.h> @@ -139,9 +140,9 @@ int AkmSensor::setDelay(int32_t handle, int64_t ns) char buffer[32]; int bytes; - if (ns < -1 || 2147483647 < ns) { - ALOGE("AkmSensor: invalid delay (%lld)", ns); - return -EINVAL; + if (ns < -1 || 2147483647 < ns) { + ALOGE("AkmSensor: invalid delay (%" PRIi64 ")", ns); + return -EINVAL; } switch (id) { @@ -160,7 +161,7 @@ int AkmSensor::setDelay(int32_t handle, int64_t ns) } if (ns != mDelay[id]) { - bytes = sprintf(buffer, "%lld", ns); + bytes = sprintf(buffer, "%" PRIi64, ns); err = write_sys_attribute(input_sysfs_path, buffer, bytes); if (err == 0) { mDelay[id] = ns; |