pwm: fix incorrect hook check
authorThomas Ingleby <thomas.c.ingleby@intel.com>
Wed, 8 Oct 2014 13:59:37 +0000 (14:59 +0100)
committerThomas Ingleby <thomas.c.ingleby@intel.com>
Wed, 8 Oct 2014 13:59:37 +0000 (14:59 +0100)
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
src/pwm/pwm.c

index 98c241e..d786859 100644 (file)
@@ -154,7 +154,7 @@ mraa_pwm_init(int pin) {
     int pinn = pinm->pinmap;
     free(pinm);
 
-    if (advance_func->gpio_init_post != NULL) {
+    if (advance_func->pwm_init_post != NULL) {
         mraa_pwm_context pret = mraa_pwm_init_raw(chip,pinn);
         mraa_result_t ret = advance_func->pwm_init_post(pret);
         if (ret != MRAA_SUCCESS) {