These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / fbtft / fb_agm1264k-fl.c
index 8f5af1d..2a50cf9 100644 (file)
@@ -41,8 +41,7 @@
 #define CS0                    gpio.aux[0]
 #define CS1                    gpio.aux[1]
 
-
-/* diffusing error (\93Floyd-Steinberg\94) */
+/* diffusing error (Floyd-Steinberg) */
 #define DIFFUSING_MATRIX_WIDTH 2
 #define DIFFUSING_MATRIX_HEIGHT        2
 
@@ -75,8 +74,6 @@ static int init_display(struct fbtft_par *par)
 {
        u8 i;
 
-       fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__);
-
        par->fbtftops.reset(par);
 
        for (i = 0; i < 2; ++i) {
@@ -94,7 +91,7 @@ static void reset(struct fbtft_par *par)
        if (par->gpio.reset == -1)
                return;
 
-       fbtft_dev_dbg(DEBUG_RESET, par, par->info->device, "%s()\n", __func__);
+       dev_dbg(par->info->device, "%s()\n", __func__);
 
        gpio_set_value(par->gpio.reset, 0);
        udelay(20);
@@ -107,7 +104,7 @@ static int verify_gpios(struct fbtft_par *par)
 {
        int i;
 
-       fbtft_dev_dbg(DEBUG_VERIFY_GPIOS, par, par->info->device,
+       dev_dbg(par->info->device,
                "%s()\n", __func__);
 
        if (par->EPIN < 0) {
@@ -145,7 +142,7 @@ static int verify_gpios(struct fbtft_par *par)
 static unsigned long
 request_gpios_match(struct fbtft_par *par, const struct fbtft_gpio *gpio)
 {
-       fbtft_dev_dbg(DEBUG_REQUEST_GPIOS_MATCH, par, par->info->device,
+       dev_dbg(par->info->device,
                "%s('%s')\n", __func__, gpio->name);
 
        if (strcasecmp(gpio->name, "wr") == 0) {
@@ -180,7 +177,7 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
 {
        va_list args;
        int i, ret;
-       u8 *buf = (u8 *)par->buf;
+       u8 *buf = par->buf;
 
        if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) {
                va_start(args, len);
@@ -245,10 +242,6 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
        addr_win.ys_page = ys / 8;
        addr_win.xe = xe;
        addr_win.ye_page = ye / 8;
-
-       fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par,
-               "%s(xs=%d, ys_page=%d, xe=%d, ye_page=%d)\n", __func__,
-               addr_win.xs, addr_win.ys_page, addr_win.xe, addr_win.ye_page);
 }
 
 static void
@@ -273,7 +266,7 @@ construct_line_bitmap(struct fbtft_par *par, u8 *dest, signed short *src,
 
 static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
 {
-       u16 *vmem16 = (u16 *)par->info->screen_base;
+       u16 *vmem16 = (u16 *)par->info->screen_buffer;
        u8 *buf = par->txbuf.buf;
        int x, y;
        int ret = 0;
@@ -285,8 +278,6 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
        if (!convert_buf)
                return -ENOMEM;
 
-       fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s()\n", __func__);
-
        /* converting to grayscale16 */
        for (x = 0; x < par->info->var.xres; ++x)
                for (y = 0; y < par->info->var.yres; ++y) {
@@ -420,7 +411,6 @@ static int write(struct fbtft_par *par, void *buf, size_t len)
 
        gpio_set_value(par->RW, 0); /* set write mode */
 
-
        while (len--) {
                u8 i, data;
 
@@ -456,6 +446,7 @@ static struct fbtft_display display = {
                .write_vmem = write_vmem,
        },
 };
+
 FBTFT_REGISTER_DRIVER(DRVNAME, "displaytronic,fb_agm1264k-fl", &display);
 
 MODULE_ALIAS("platform:" DRVNAME);