Private
Public Access
2
0

iio: Simplify API

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2015-09-30 10:27:06 +01:00
parent d8c2c7c483
commit 2b9e832ff9
2 changed files with 8 additions and 61 deletions

View File

@@ -176,6 +176,7 @@ mraa_init()
if (fd != -1) {
len = read(fd, &name, 64);
if (len > 1) {
// use strndup
device->name = malloc((sizeof(char) * len) + sizeof(char));
strncpy(device->name, name, len);
}
@@ -775,6 +776,7 @@ mraa_find_iio_device(const char* devicename)
int i = 0;
for (i; i < plat->iio_device_count; i++) {
#if 0
// compare with devices array
if (!strcmp() {
}
#endif