From b38c760ab0e1d7e051f13e31771514b5809de222 Mon Sep 17 00:00:00 2001 From: Madhusudhanan Ravindran Date: Mon, 1 Jun 2015 12:34:56 +0000 Subject: staging: fbtft: replace fbtft_dev_dbg with standard dev_dbg call 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fbtft/fb_agm1264k-fl.c | 6 +++--- drivers/staging/fbtft/fbtft-core.c | 15 +++++++-------- drivers/staging/fbtft/fbtft.h | 5 ----- 3 files changed, 10 insertions(+), 16 deletions(-) (limited to 'drivers/staging/fbtft') diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c b/drivers/staging/fbtft/fb_agm1264k-fl.c index 8f5af1d..94dd49c 100644 --- a/drivers/staging/fbtft/fb_agm1264k-fl.c +++ b/drivers/staging/fbtft/fb_agm1264k-fl.c @@ -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) { diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index ce64521..d01856f 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -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) diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h index 9fd98cb..7d817eb 100644 --- a/drivers/staging/fbtft/fbtft.h +++ b/drivers/staging/fbtft/fbtft.h @@ -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 { \ -- cgit v1.1