Message ID | 1583941940-17194-1-git-send-email-gupt21@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] pwm: pca9685: use gpio core provided macro GPIO_LINE_DIRECTION_OUT | expand |
On Wed, Mar 11, 2020 at 09:22:20PM +0530, Rishi Gupta wrote: > GPIO core recently added macro to uniformly specify direction > of a GPIO Line, so use it. > > Signed-off-by: Rishi Gupta <gupt21@gmail.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Best regards and thanks Uwe
diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c index b2a9e77..e2bac1e 100644 --- a/drivers/pwm/pwm-pca9685.c +++ b/drivers/pwm/pwm-pca9685.c @@ -168,7 +168,7 @@ static int pca9685_pwm_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) { /* Always out */ - return 0; + return GPIO_LINE_DIRECTION_OUT; } static int pca9685_pwm_gpio_direction_input(struct gpio_chip *gpio,
GPIO core recently added macro to uniformly specify direction of a GPIO Line, so use it. Signed-off-by: Rishi Gupta <gupt21@gmail.com> --- drivers/pwm/pwm-pca9685.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)