From 0464892aeef4e51637ae58a5dc132e53a9127ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= Date: Tue, 20 Oct 2015 13:48:48 +0200 Subject: [PATCH] drivers/servo: fix initialization The pwm to initialize must be read from arguments. --- drivers/servo/servo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/servo/servo.c b/drivers/servo/servo.c index 91699370d1..054347640d 100644 --- a/drivers/servo/servo.c +++ b/drivers/servo/servo.c @@ -34,7 +34,7 @@ int servo_init(servo_t *dev, pwm_t pwm, int pwm_channel, unsigned int min, unsig { int actual_frequency; - actual_frequency = pwm_init(dev->device, PWM_LEFT, FREQUENCY, RESOLUTION); + actual_frequency = pwm_init(pwm, PWM_LEFT, FREQUENCY, RESOLUTION); DEBUG("servo: requested %d hz, got %d hz\n", FREQUENCY, actual_frequency);