diff options
author | Joe Perches <joe@perches.com> | 2013-09-19 18:35:55 -0700 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-10-29 12:53:07 +0200 |
commit | 31b6780c15a4e3a90fe260e977f5186772ce7afb (patch) | |
tree | 9147371d1b0f5b6dbf1806a7af125552a67fbc3b /drivers/video/arkfb.c | |
parent | f51a07d05c5142e73f781d878f411d63d3548a49 (diff) | |
download | op-kernel-dev-31b6780c15a4e3a90fe260e977f5186772ce7afb.zip op-kernel-dev-31b6780c15a4e3a90fe260e977f5186772ce7afb.tar.gz |
framebuffer: Use fb_<level>
Neaten and shorten the code using the new fb_<level> macros.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/arkfb.c')
-rw-r--r-- | drivers/video/arkfb.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c index 15dd542..a6b29bd 100644 --- a/drivers/video/arkfb.c +++ b/drivers/video/arkfb.c @@ -137,8 +137,7 @@ static void arkfb_settile(struct fb_info *info, struct fb_tilemap *map) if ((map->width != 8) || (map->height != 16) || (map->depth != 1) || (map->length != 256)) { - printk(KERN_ERR "fb%d: unsupported font parameters: width %d, " - "height %d, depth %d, length %d\n", info->node, + fb_err(info, "unsupported font parameters: width %d, height %d, depth %d, length %d\n", map->width, map->height, map->depth, map->length); return; } @@ -517,7 +516,7 @@ static void ark_set_pixclock(struct fb_info *info, u32 pixclock) int rv = dac_set_freq(par->dac, 0, 1000000000 / pixclock); if (rv < 0) { - printk(KERN_ERR "fb%d: cannot set requested pixclock, keeping old value\n", info->node); + fb_err(info, "cannot set requested pixclock, keeping old value\n"); return; } @@ -584,7 +583,7 @@ static int arkfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) rv = svga_match_format (arkfb_formats, var, NULL); if (rv < 0) { - printk(KERN_ERR "fb%d: unsupported mode requested\n", info->node); + fb_err(info, "unsupported mode requested\n"); return rv; } @@ -604,14 +603,15 @@ static int arkfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) mem = ((var->bits_per_pixel * var->xres_virtual) >> 3) * var->yres_virtual; if (mem > info->screen_size) { - printk(KERN_ERR "fb%d: not enough framebuffer memory (%d kB requested , %d kB available)\n", info->node, mem >> 10, (unsigned int) (info->screen_size >> 10)); + fb_err(info, "not enough framebuffer memory (%d kB requested, %d kB available)\n", + mem >> 10, (unsigned int) (info->screen_size >> 10)); return -EINVAL; } rv = svga_check_timings (&ark_timing_regs, var, info->node); if (rv < 0) { - printk(KERN_ERR "fb%d: invalid timings requested\n", info->node); + fb_err(info, "invalid timings requested\n"); return rv; } @@ -693,7 +693,7 @@ static int arkfb_set_par(struct fb_info *info) vga_wseq(par->state.vgabase, 0x18, regval); /* Set the offset register */ - pr_debug("fb%d: offset register : %d\n", info->node, offset_value); + fb_dbg(info, "offset register : %d\n", offset_value); svga_wcrt_multi(par->state.vgabase, ark_offset_regs, offset_value); /* fix for hi-res textmode */ @@ -716,7 +716,7 @@ static int arkfb_set_par(struct fb_info *info) /* Set mode-specific register values */ switch (mode) { case 0: - pr_debug("fb%d: text mode\n", info->node); + fb_dbg(info, "text mode\n"); svga_set_textmode_vga_regs(par->state.vgabase); vga_wseq(par->state.vgabase, 0x11, 0x10); /* basic VGA mode */ @@ -725,7 +725,7 @@ static int arkfb_set_par(struct fb_info *info) break; case 1: - pr_debug("fb%d: 4 bit pseudocolor\n", info->node); + fb_dbg(info, "4 bit pseudocolor\n"); vga_wgfx(par->state.vgabase, VGA_GFX_MODE, 0x40); vga_wseq(par->state.vgabase, 0x11, 0x10); /* basic VGA mode */ @@ -733,44 +733,44 @@ static int arkfb_set_par(struct fb_info *info) dac_set_mode(par->dac, DAC_PSEUDO8_8); break; case 2: - pr_debug("fb%d: 4 bit pseudocolor, planar\n", info->node); + fb_dbg(info, "4 bit pseudocolor, planar\n"); vga_wseq(par->state.vgabase, 0x11, 0x10); /* basic VGA mode */ svga_wcrt_mask(par->state.vgabase, 0x46, 0x00, 0x04); /* 8bit pixel path */ dac_set_mode(par->dac, DAC_PSEUDO8_8); break; case 3: - pr_debug("fb%d: 8 bit pseudocolor\n", info->node); + fb_dbg(info, "8 bit pseudocolor\n"); vga_wseq(par->state.vgabase, 0x11, 0x16); /* 8bpp accel mode */ if (info->var.pixclock > 20000) { - pr_debug("fb%d: not using multiplex\n", info->node); + fb_dbg(info, "not using multiplex\n"); svga_wcrt_mask(par->state.vgabase, 0x46, 0x00, 0x04); /* 8bit pixel path */ dac_set_mode(par->dac, DAC_PSEUDO8_8); } else { - pr_debug("fb%d: using multiplex\n", info->node); + fb_dbg(info, "using multiplex\n"); svga_wcrt_mask(par->state.vgabase, 0x46, 0x04, 0x04); /* 16bit pixel path */ dac_set_mode(par->dac, DAC_PSEUDO8_16); hdiv = 2; } break; case 4: - pr_debug("fb%d: 5/5/5 truecolor\n", info->node); + fb_dbg(info, "5/5/5 truecolor\n"); vga_wseq(par->state.vgabase, 0x11, 0x1A); /* 16bpp accel mode */ svga_wcrt_mask(par->state.vgabase, 0x46, 0x04, 0x04); /* 16bit pixel path */ dac_set_mode(par->dac, DAC_RGB1555_16); break; case 5: - pr_debug("fb%d: 5/6/5 truecolor\n", info->node); + fb_dbg(info, "5/6/5 truecolor\n"); vga_wseq(par->state.vgabase, 0x11, 0x1A); /* 16bpp accel mode */ svga_wcrt_mask(par->state.vgabase, 0x46, 0x04, 0x04); /* 16bit pixel path */ dac_set_mode(par->dac, DAC_RGB0565_16); break; case 6: - pr_debug("fb%d: 8/8/8 truecolor\n", info->node); + fb_dbg(info, "8/8/8 truecolor\n"); vga_wseq(par->state.vgabase, 0x11, 0x16); /* 8bpp accel mode ??? */ svga_wcrt_mask(par->state.vgabase, 0x46, 0x04, 0x04); /* 16bit pixel path */ @@ -779,7 +779,7 @@ static int arkfb_set_par(struct fb_info *info) hdiv = 2; break; case 7: - pr_debug("fb%d: 8/8/8/8 truecolor\n", info->node); + fb_dbg(info, "8/8/8/8 truecolor\n"); vga_wseq(par->state.vgabase, 0x11, 0x1E); /* 32bpp accel mode */ svga_wcrt_mask(par->state.vgabase, 0x46, 0x04, 0x04); /* 16bit pixel path */ @@ -787,7 +787,7 @@ static int arkfb_set_par(struct fb_info *info) hmul = 2; break; default: - printk(KERN_ERR "fb%d: unsupported mode - bug\n", info->node); + fb_err(info, "unsupported mode - bug\n"); return -EINVAL; } @@ -879,19 +879,19 @@ static int arkfb_blank(int blank_mode, struct fb_info *info) switch (blank_mode) { case FB_BLANK_UNBLANK: - pr_debug("fb%d: unblank\n", info->node); + fb_dbg(info, "unblank\n"); svga_wseq_mask(par->state.vgabase, 0x01, 0x00, 0x20); svga_wcrt_mask(par->state.vgabase, 0x17, 0x80, 0x80); break; case FB_BLANK_NORMAL: - pr_debug("fb%d: blank\n", info->node); + fb_dbg(info, "blank\n"); svga_wseq_mask(par->state.vgabase, 0x01, 0x20, 0x20); svga_wcrt_mask(par->state.vgabase, 0x17, 0x80, 0x80); break; case FB_BLANK_POWERDOWN: case FB_BLANK_HSYNC_SUSPEND: case FB_BLANK_VSYNC_SUSPEND: - pr_debug("fb%d: sync down\n", info->node); + fb_dbg(info, "sync down\n"); svga_wseq_mask(par->state.vgabase, 0x01, 0x20, 0x20); svga_wcrt_mask(par->state.vgabase, 0x17, 0x00, 0x80); break; @@ -1052,8 +1052,8 @@ static int ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) goto err_reg_fb; } - printk(KERN_INFO "fb%d: %s on %s, %d MB RAM\n", info->node, info->fix.id, - pci_name(dev), info->fix.smem_len >> 20); + fb_info(info, "%s on %s, %d MB RAM\n", + info->fix.id, pci_name(dev), info->fix.smem_len >> 20); /* Record a reference to the driver data */ pci_set_drvdata(dev, info); |