projects
/
contrib
/
mraa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4757d03
)
mraa.c: usb MRAA_UNKNOWN_PLATFORM is not considered initialisation
author
Brendan Le Foll
<brendan.le.foll@intel.com>
Tue, 11 Aug 2015 10:54:11 +0000
(11:54 +0100)
committer
Brendan Le Foll
<brendan.le.foll@intel.com>
Tue, 8 Sep 2015 13:42:04 +0000
(14:42 +0100)
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/mraa.c
patch
|
blob
|
history
diff --git
a/src/mraa.c
b/src/mraa.c
index
0a7bbd6
..
fdb1373
100644
(file)
--- a/
src/mraa.c
+++ b/
src/mraa.c
@@
-131,8
+131,10
@@
mraa_init()
// Now detect sub platform
if (plat != NULL) {
mraa_platform_t usb_platform_type = mraa_usb_platform_extender(plat);
- if (plat->platform_type == MRAA_UNKNOWN_PLATFORM) {
+ if (plat->platform_type == MRAA_UNKNOWN_PLATFORM
&& usb_platform_type != MRAA_UNKNOWN_PLATFORM
) {
plat->platform_type = usb_platform_type;
+ } else {
+ return MRAA_ERROR_PLATFORM_NOT_INITIALISED;
}
}
if (plat == NULL) {