From a2c7eb5458ce742358007428f33428530a6b9b94 Mon Sep 17 00:00:00 2001 From: Thomas Ingleby Date: Wed, 21 May 2014 14:56:11 +0100 Subject: [PATCH] pwm: made export functions static * removed functions from external api also. Signed-off-by: Thomas Ingleby --- api/pwm.h | 17 ----------------- src/pwm/pwm.c | 18 +++++++++--------- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/api/pwm.h b/api/pwm.h index effa8f1..dc76590 100644 --- a/api/pwm.h +++ b/api/pwm.h @@ -142,23 +142,6 @@ maa_result_t maa_pwm_pulsewidth_us(maa_pwm_context pwm, int us); */ maa_result_t maa_pwm_enable(maa_pwm_context pwm, int enable); -/** Unexport the PWM context (maa_pwm_close() will call this function) - * - * @param dev The PWM context/ - * - * @return maa result type. - */ -maa_result_t maa_pwm_unexport(maa_pwm_context pwm); - -/** Unexport the PWM context (maa_pwm_close() will call this function) - * Forces operation regardless of ownership. - * - * @param dev The PWM context/ - * - * @return maa result type. - */ -maa_result_t maa_pwm_unexport_force(maa_pwm_context pwm); - /** Change ownership of context * * @param pwm the context diff --git a/src/pwm/pwm.c b/src/pwm/pwm.c index 5e80d29..10ba49e 100644 --- a/src/pwm/pwm.c +++ b/src/pwm/pwm.c @@ -259,15 +259,6 @@ maa_pwm_enable(maa_pwm_context dev, int enable) return MAA_SUCCESS; } -maa_result_t -maa_pwm_unexport(maa_pwm_context dev) -{ - if (dev->owner) { - return maa_pwm_unexport_force(dev); - } - return MAA_ERROR_INVALID_RESOURCE; -} - maa_result_t maa_pwm_unexport_force(maa_pwm_context dev) { @@ -292,6 +283,15 @@ maa_pwm_unexport_force(maa_pwm_context dev) return MAA_SUCCESS; } +maa_result_t +maa_pwm_unexport(maa_pwm_context dev) +{ + if (dev->owner) { + return maa_pwm_unexport_force(dev); + } + return MAA_ERROR_INVALID_RESOURCE; +} + maa_result_t maa_pwm_close(maa_pwm_context dev) {