OSDN Git Service

Staging: fbtft: fb_watterott: fix incorrect type in assignments
authorJulián de Gortari <kiototeko@gmail.com>
Mon, 20 Feb 2017 03:02:32 +0000 (21:02 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:16:59 +0000 (09:16 +0100)
__be16 type variables should be used with return value of macro
cpu_to_be16()

Signed-off-by: Julián de Gortari <kiototeko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fb_watterott.c

index 4293045..180e5be 100644 (file)
@@ -69,8 +69,8 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
 {
        unsigned int start_line, end_line;
        u16 *vmem16 = (u16 *)(par->info->screen_buffer + offset);
-       u16 *pos = par->txbuf.buf + 1;
-       u16 *buf16 = par->txbuf.buf + 10;
+       __be16 *pos = par->txbuf.buf + 1;
+       __be16 *buf16 = par->txbuf.buf + 10;
        int i, j;
        int ret = 0;
 
@@ -106,7 +106,7 @@ static int write_vmem_8bit(struct fbtft_par *par, size_t offset, size_t len)
 {
        unsigned int start_line, end_line;
        u16 *vmem16 = (u16 *)(par->info->screen_buffer + offset);
-       u16 *pos = par->txbuf.buf + 1;
+       __be16 *pos = par->txbuf.buf + 1;
        u8 *buf8 = par->txbuf.buf + 10;
        int i, j;
        int ret = 0;