aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/sm7xx/smtcfb.c
diff options
context:
space:
mode:
authorJavier M. Mellid <jmunhoz@igalia.com>2012-04-26 14:45:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-29 21:30:57 -0400
commitbfdd40361987b5c2bd427f0fcf869b8862d4498d (patch)
treef9db34a8eb5118798b10b08c3f60ca2fcc85fd28 /drivers/staging/sm7xx/smtcfb.c
parentd89954fa9b3db254d40136080e91f8ce19646345 (diff)
staging: sm7xx: use dynamic debug support
This patch uses dynamic debug support. Tested with SM712 Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm7xx/smtcfb.c')
-rw-r--r--drivers/staging/sm7xx/smtcfb.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c
index abed491ef46..69721c2c50e 100644
--- a/drivers/staging/sm7xx/smtcfb.c
+++ b/drivers/staging/sm7xx/smtcfb.c
@@ -33,12 +33,6 @@
33 33
34#include "smtcfb.h" 34#include "smtcfb.h"
35 35
36#ifdef DEBUG
37#define smdbg(format, arg...) printk(KERN_DEBUG format , ## arg)
38#else
39#define smdbg(format, arg...)
40#endif
41
42struct screen_info smtc_screen_info; 36struct screen_info smtc_screen_info;
43 37
44/* 38/*
@@ -134,8 +128,9 @@ static void sm712_set_timing(struct smtcfb_info *sfb,
134 int i = 0, j = 0; 128 int i = 0, j = 0;
135 u32 m_nScreenStride; 129 u32 m_nScreenStride;
136 130
137 smdbg("\nppar_info->width = %d ppar_info->height = %d" 131 dev_dbg(&sfb->dev->dev,
138 "sfb->fb.var.bits_per_pixel = %d ppar_info->hz = %d\n", 132 "ppar_info->width=%d ppar_info->height=%d"
133 "sfb->fb.var.bits_per_pixel=%d ppar_info->hz=%d\n",
139 ppar_info->width, ppar_info->height, 134 ppar_info->width, ppar_info->height,
140 sfb->fb.var.bits_per_pixel, ppar_info->hz); 135 sfb->fb.var.bits_per_pixel, ppar_info->hz);
141 136
@@ -145,13 +140,14 @@ static void sm712_set_timing(struct smtcfb_info *sfb,
145 VGAMode[j].bpp == sfb->fb.var.bits_per_pixel && 140 VGAMode[j].bpp == sfb->fb.var.bits_per_pixel &&
146 VGAMode[j].hz == ppar_info->hz) { 141 VGAMode[j].hz == ppar_info->hz) {
147 142
148 smdbg("\nVGAMode[j].mmSizeX = %d VGAMode[j].mmSizeY =" 143 dev_dbg(&sfb->dev->dev,
149 "%d VGAMode[j].bpp = %d" 144 "VGAMode[j].mmSizeX=%d VGAMode[j].mmSizeY=%d"
150 "VGAMode[j].hz=%d\n", 145 "VGAMode[j].bpp=%d VGAMode[j].hz=%d\n",
151 VGAMode[j].mmSizeX, VGAMode[j].mmSizeY, 146 VGAMode[j].mmSizeX, VGAMode[j].mmSizeY,
152 VGAMode[j].bpp, VGAMode[j].hz); 147 VGAMode[j].bpp, VGAMode[j].hz);
153 148
154 smdbg("VGAMode index=%d\n", j); 149 dev_dbg(&sfb->dev->dev,
150 "VGAMode index=%d\n", j);
155 151
156 smtc_mmiowb(0x0, 0x3c6); 152 smtc_mmiowb(0x0, 0x3c6);
157 153
@@ -805,16 +801,14 @@ static int __init sm712vga_setup(char *options)
805{ 801{
806 int index; 802 int index;
807 803
808 if (!options || !*options) { 804 if (!options || !*options)
809 smdbg("\n No vga parameter\n");
810 return -EINVAL; 805 return -EINVAL;
811 }
812 806
813 smtc_screen_info.lfb_width = 0; 807 smtc_screen_info.lfb_width = 0;
814 smtc_screen_info.lfb_height = 0; 808 smtc_screen_info.lfb_height = 0;
815 smtc_screen_info.lfb_depth = 0; 809 smtc_screen_info.lfb_depth = 0;
816 810
817 smdbg("\nsm712vga_setup = %s\n", options); 811 pr_debug("sm712vga_setup = %s\n", options);
818 812
819 for (index = 0; 813 for (index = 0;
820 index < ARRAY_SIZE(vesa_mode); 814 index < ARRAY_SIZE(vesa_mode);