@@ -2,7 +2,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/spi/spi.h>
#include <linux/delay.h>
@@ -80,8 +80,8 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
va_start(args, len);
*buf = (u8)va_arg(args, unsigned int);
- if (par->gpio.dc != -1)
- gpio_set_value(par->gpio.dc, 0);
+ if (!par->gpio.dc)
+ gpiod_set_value(par->gpio.dc, 0);
ret = par->fbtftops.write(par, par->buf, sizeof(u8));
if (ret < 0) {
va_end(args);
@@ -103,8 +103,8 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
return;
}
}
- if (par->gpio.dc != -1)
- gpio_set_value(par->gpio.dc, 1);
+ if (!par->gpio.dc)
+ gpiod_set_value(par->gpio.dc, 1);
va_end(args);
}
This switches the fb_ssd1331.c to use GPIO descriptors rather than numerical gpios. Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> --- drivers/staging/fbtft/fb_ssd1331.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)