From 76971c6b0b2f70a619d3d6f2c103c8ec15513fff Mon Sep 17 00:00:00 2001 From: Thomas Ingleby Date: Thu, 19 Jun 2014 13:54:19 +0100 Subject: [PATCH] maa: change dependency on direction for muxs * Will not error if cannot set direction, as some muxes are do not have * the direction file. If the mux really isnt in output mode the * following write would also fail. Signed-off-by: Thomas Ingleby --- src/maa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/maa.c b/src/maa.c index bfb137e..4cb3283 100644 --- a/src/maa.c +++ b/src/maa.c @@ -119,8 +119,7 @@ maa_setup_mux_mapped(maa_pin_t meta) mux_i = maa_gpio_init_raw(meta.mux[mi].pin); if (mux_i == NULL) return MAA_ERROR_INVALID_HANDLE; - if (maa_gpio_dir(mux_i, MAA_GPIO_OUT) != MAA_SUCCESS) - return MAA_ERROR_INVALID_RESOURCE; + maa_gpio_dir(mux_i, MAA_GPIO_OUT); if (maa_gpio_write(mux_i, meta.mux[mi].value) != MAA_SUCCESS) return MAA_ERROR_INVALID_RESOURCE; }