staging: fbtft: replace fbtft_dev_dbg with standard dev_dbg call
authorMadhusudhanan Ravindran <mravindr@visteon.com>
Mon, 1 Jun 2015 12:34:56 +0000 (12:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jun 2015 20:21:37 +0000 (13:21 -0700)
This patch attempts to simplify the debugging using standard
dev_dbg call so that individual debug prints can be enabled or
disbled by dynamic debugging rather than using module params.

Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fb_agm1264k-fl.c
drivers/staging/fbtft/fbtft-core.c
drivers/staging/fbtft/fbtft.h

index 8f5af1db852c2dfcdc05f4701a59c659164b40f1..94dd49ce18deb09cb49b9c9bcacbbebcebe3bb64 100644 (file)
@@ -94,7 +94,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 +107,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 +145,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) {
index ce645213a5393b8bb37d27021afda16f389cd5f9..d01856f7d1bc2f9903dc162b1212873f66cfa01b 100644 (file)
@@ -486,7 +486,7 @@ static void fbtft_deferred_io(struct fb_info *info, struct list_head *pagelist)
                index = page->index << PAGE_SHIFT;
                y_low = index / info->fix.line_length;
                y_high = (index + PAGE_SIZE - 1) / info->fix.line_length;
-               fbtft_dev_dbg(DEBUG_DEFERRED_IO, par, info->device,
+               dev_dbg(info->device,
                        "page->index=%lu y_low=%d y_high=%d\n",
                        page->index, y_low, y_high);
                if (y_high > info->var.yres - 1)
@@ -507,7 +507,7 @@ static void fbtft_fb_fillrect(struct fb_info *info,
 {
        struct fbtft_par *par = info->par;
 
-       fbtft_dev_dbg(DEBUG_FB_FILLRECT, par, info->dev,
+       dev_dbg(info->dev,
                "%s: dx=%d, dy=%d, width=%d, height=%d\n",
                __func__, rect->dx, rect->dy, rect->width, rect->height);
        sys_fillrect(info, rect);
@@ -520,7 +520,7 @@ static void fbtft_fb_copyarea(struct fb_info *info,
 {
        struct fbtft_par *par = info->par;
 
-       fbtft_dev_dbg(DEBUG_FB_COPYAREA, par, info->dev,
+       dev_dbg(info->dev,
                "%s: dx=%d, dy=%d, width=%d, height=%d\n",
                __func__,  area->dx, area->dy, area->width, area->height);
        sys_copyarea(info, area);
@@ -533,7 +533,7 @@ static void fbtft_fb_imageblit(struct fb_info *info,
 {
        struct fbtft_par *par = info->par;
 
-       fbtft_dev_dbg(DEBUG_FB_IMAGEBLIT, par, info->dev,
+       dev_dbg(info->dev,
                "%s: dx=%d, dy=%d, width=%d, height=%d\n",
                __func__,  image->dx, image->dy, image->width, image->height);
        sys_imageblit(info, image);
@@ -547,7 +547,7 @@ static ssize_t fbtft_fb_write(struct fb_info *info, const char __user *buf,
        struct fbtft_par *par = info->par;
        ssize_t res;
 
-       fbtft_dev_dbg(DEBUG_FB_WRITE, par, info->dev,
+       dev_dbg(info->dev,
                "%s: count=%zd, ppos=%llu\n", __func__,  count, *ppos);
        res = fb_sys_write(info, buf, count, ppos);
 
@@ -570,11 +570,10 @@ static int fbtft_fb_setcolreg(unsigned regno, unsigned red, unsigned green,
                              unsigned blue, unsigned transp,
                              struct fb_info *info)
 {
-       struct fbtft_par *par = info->par;
        unsigned val;
        int ret = 1;
 
-       fbtft_dev_dbg(DEBUG_FB_SETCOLREG, par, info->dev,
+       dev_dbg(info->dev,
                "%s(regno=%u, red=0x%X, green=0x%X, blue=0x%X, trans=0x%X)\n",
                __func__, regno, red, green, blue, transp);
 
@@ -601,7 +600,7 @@ static int fbtft_fb_blank(int blank, struct fb_info *info)
        struct fbtft_par *par = info->par;
        int ret = -EINVAL;
 
-       fbtft_dev_dbg(DEBUG_FB_BLANK, par, info->dev, "%s(blank=%d)\n",
+       dev_dbg(info->dev, "%s(blank=%d)\n",
                __func__, blank);
 
        if (!par->fbtftops.blank)
index 9fd98cb534186776f25a289bc07b90bbb65e22f3..7d817eb26eabeecf6ec5fc49fc76f39b69022d20 100644 (file)
@@ -430,11 +430,6 @@ do {                                                         \
                dev_info(par->info->device, format, ##arg);  \
 } while (0)
 
-#define fbtft_dev_dbg(level, par, dev, format, arg...)       \
-do {                                                         \
-       if (unlikely(par->debug & level))                    \
-               dev_info(dev, format, ##arg);                \
-} while (0)
 
 #define fbtft_par_dbg_hex(level, par, dev, type, buf, num, format, arg...) \
 do {                                                                       \