diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2017-03-02 22:20:42 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-09 17:33:18 +0100 |
commit | 74ec0a0e373bfbf107f1eaba7eec8bbaf4e1d021 (patch) | |
tree | e5403815eb26e87a69e7fa80faca7cb2693cad8c /drivers/staging/fbtft | |
parent | e70065fdc11d86fac671c9e4103d69ac099f46c9 (diff) | |
download | linux-74ec0a0e373bfbf107f1eaba7eec8bbaf4e1d021.tar.bz2 |
staging: fbtft: fb_sh1106: use new helper helper fbtft_write_buf_dc
Make use of new helper fbtft_write_buf_dc.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft')
-rw-r--r-- | drivers/staging/fbtft/fb_sh1106.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/staging/fbtft/fb_sh1106.c b/drivers/staging/fbtft/fb_sh1106.c index 124a4ca9051b..89c27a440305 100644 --- a/drivers/staging/fbtft/fb_sh1106.c +++ b/drivers/staging/fbtft/fb_sh1106.c @@ -140,13 +140,9 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) buf[x] |= BIT(i); /* Write data */ - gpio_set_value(par->gpio.dc, 1); - ret = par->fbtftops.write(par, buf, xres); - if (ret < 0) { - dev_err(par->info->device, - "write failed and returned: %d\n", ret); + ret = fbtft_write_buf_dc(par, buf, xres, 1); + if (ret < 0) return ret; - } } return 0; @@ -155,7 +151,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) static void write_register(struct fbtft_par *par, int len, ...) { va_list args; - int i, ret; + int i; va_start(args, len); @@ -163,12 +159,7 @@ static void write_register(struct fbtft_par *par, int len, ...) par->buf[i] = va_arg(args, unsigned int); /* keep DC low for all command bytes to transfer */ - gpio_set_value(par->gpio.dc, 0); - - ret = par->fbtftops.write(par, par->buf, len); - if (ret < 0) - dev_err(par->info->device, - "write() failed and returned %d\n", ret); + fbtft_write_buf_dc(par, par->buf, len, 0); va_end(args); } |