
This patch adds KERN_ constants to all of the printk()'s that need them in
drivers/video/radeonfb.c

Signed-off-by: James Nelson <james4765@gmail.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
---


 kj-domen/drivers/video/radeonfb.c |   63 +++++++++++++++++---------------------
 1 files changed, 29 insertions(+), 34 deletions(-)

diff -puN drivers/video/radeonfb.c~printk-drivers_video_radeonfb drivers/video/radeonfb.c
--- kj/drivers/video/radeonfb.c~printk-drivers_video_radeonfb	2005-03-02 10:44:35.000000000 +0100
+++ kj-domen/drivers/video/radeonfb.c	2005-03-02 10:44:35.000000000 +0100
@@ -28,6 +28,7 @@
  *
  */
 
+#define DEBUG
 
 #define RADEON_VERSION	"0.1.6"
 
@@ -80,13 +81,7 @@
 #include <video/radeon.h>
 #include <linux/radeonfb.h>
 
-#define DEBUG	1
-
-#if DEBUG
-#define RTRACE		printk
-#else
-#define RTRACE		if(0) printk
-#endif
+#define RTRACE		pr_debug
 
 // XXX
 #undef CONFIG_PMAC_PBOOK
@@ -807,7 +802,7 @@ static void radeon_get_pllinfo(struct ra
         	rinfo->pll.ppll_min = pll.PCLK_min_freq;
         	rinfo->pll.ppll_max = pll.PCLK_max_freq;
 
-		printk("radeonfb: ref_clk=%d, ref_div=%d, xclk=%d from BIOS\n",
+		pr_info("radeonfb: ref_clk=%d, ref_div=%d, xclk=%d from BIOS\n",
 			rinfo->pll.ref_clk, rinfo->pll.ref_div, rinfo->pll.xclk);
 	} else {
 #ifdef CONFIG_PPC_OF
@@ -827,7 +822,7 @@ static void radeon_get_pllinfo(struct ra
 			rinfo->pll.ppll_min = 12000;
 			rinfo->pll.ppll_max = 35000;
 
-			printk("radeonfb: ref_clk=%d, ref_div=%d, xclk=%d from OF\n",
+			pr_info("radeonfb: ref_clk=%d, ref_div=%d, xclk=%d from OF\n",
 				rinfo->pll.ref_clk, rinfo->pll.ref_div, rinfo->pll.xclk);
 
 			return;
@@ -887,7 +882,7 @@ static void radeon_get_pllinfo(struct ra
 				break;
 		}
 
-		printk("radeonfb: ref_clk=%d, ref_div=%d, xclk=%d defaults\n",
+		pr_info("radeonfb: ref_clk=%d, ref_div=%d, xclk=%d defaults\n",
 			rinfo->pll.ref_clk, rinfo->pll.ref_div, rinfo->pll.xclk);
 	}
 }
@@ -1009,7 +1004,7 @@ static int radeon_dfp_parse_EDID(struct 
 			rinfo->vAct_high = 1;
 	}
 
-	printk("radeonfb: detected DFP panel size from EDID: %dx%d\n",
+	pr_info("radeonfb: detected DFP panel size from EDID: %dx%d\n",
 		rinfo->panel_xres, rinfo->panel_yres);
 
 	rinfo->got_dfpinfo = 1;
@@ -1061,22 +1056,22 @@ static int radeon_get_dfpinfo_BIOS(struc
 		return 0;
 
 	if (!(fpbiosstart = rinfo->bios_seg + readw(rinfo->bios_seg + 0x48))) {
-		printk("radeonfb: Failed to detect DFP panel info using BIOS\n");
+		printk(KERN_NOTICE "radeonfb: Failed to detect DFP panel info using BIOS\n");
 		return 0;
 	}
 
 	if (!(tmp = rinfo->bios_seg + readw(fpbiosstart + 0x40))) {
-		printk("radeonfb: Failed to detect DFP panel info using BIOS\n");
+		printk(KERN_NOTICE "radeonfb: Failed to detect DFP panel info using BIOS\n");
 		return 0;
 	}
 
 	for(i=0; i<24; i++)
 		stmp[i] = readb(tmp+i+1);
 	stmp[24] = 0;
-	printk("radeonfb: panel ID string: %s\n", stmp);
+	pr_info("radeonfb: panel ID string: %s\n", stmp);
 	rinfo->panel_xres = readw(tmp + 25);
 	rinfo->panel_yres = readw(tmp + 27);
-	printk("radeonfb: detected DFP panel size from BIOS: %dx%d\n",
+	pr_info("radeonfb: detected DFP panel size from BIOS: %dx%d\n",
 		rinfo->panel_xres, rinfo->panel_yres);
 
 	for(i=0; i<32; i++) {
@@ -1152,11 +1147,11 @@ static int radeon_get_dfpinfo (struct ra
 				rinfo->panel_xres = 1600;
 				break;
 			default:
-				printk("radeonfb: Failed to detect DFP panel size\n");
+				printk(KERN_NOTICE "radeonfb: Failed to detect DFP panel size\n");
 				return 0;
 		}
 
-		printk("radeonfb: detected DFP panel size from registers: %dx%d\n",
+		pr_info("radeonfb: detected DFP panel size from registers: %dx%d\n",
 			rinfo->panel_xres, rinfo->panel_yres);
 
 		tmp = INREG(FP_CRTC_H_TOTAL_DISP);
@@ -1326,20 +1321,20 @@ static int radeon_do_maximize(struct rad
   
         /* use highest possible virtual resolution */
         if (v->xres_virtual == -1 && v->yres_virtual == -1) {
-                printk("radeonfb: using max available virtual resolution\n");
+                pr_info("radeonfb: using max available virtual resolution\n");
                 for (i=0; modes[i].xres != -1; i++) {
                         if (modes[i].xres * nom / den * modes[i].yres <
                             rinfo->video_ram / 2)
                                 break;
                 }
                 if (modes[i].xres == -1) {
-                        printk("radeonfb: could not find virtual resolution that fits into video memory!\n");
+                        printk(KERN_NOTICE "radeonfb: could not find virtual resolution that fits into video memory!\n");
                         return -EINVAL;
                 }
                 v->xres_virtual = modes[i].xres;  
                 v->yres_virtual = modes[i].yres;
                 
-                printk("radeonfb: virtual resolution set to max of %dx%d\n",
+                pr_info("radeonfb: virtual resolution set to max of %dx%d\n",
                         v->xres_virtual, v->yres_virtual);
         } else if (v->xres_virtual == -1) {
                 v->xres_virtual = (rinfo->video_ram * den /   
@@ -1444,7 +1439,7 @@ static int radeonfb_check_var (struct fb
                         v.transp.length = 8;
                         break;
                 default:
-                        printk ("radeonfb: mode %dx%dx%d rejected, color depth invalid\n",
+                        printk (KERN_ERR "radeonfb: mode %dx%dx%d rejected, color depth invalid\n",
                                 var->xres, var->yres, var->bits_per_pixel);
                         return -EINVAL;
         }
@@ -1977,7 +1972,7 @@ static int radeonfb_set_par (struct fb_i
 	RTRACE("vclk_freq = %d, per = %d\n", vclk_freq, xclk_per_trans_precise);
 
 	if ((ron + rinfo->ram.rloop) >= roff) {
-		printk("radeonfb: error ron out of range\n");
+		printk(KERN_ERR "radeonfb: error ron out of range\n");
 		return -EINVAL;
 	}
 
@@ -2769,7 +2764,7 @@ int radeon_sleep_notify(struct pmu_sleep
 
 				radeonfb_blank(0, (struct fb_info *)rinfo);
 				release_console_sem();
-				printk("CLK_PIN_CNTL on wakeup was: %08x\n", dbg_clk);
+				printk(KERN_DEBUG "CLK_PIN_CNTL on wakeup was: %08x\n", dbg_clk);
 				break;
 		}
 	}
@@ -2796,7 +2791,7 @@ static int radeonfb_pci_register (struct
 
 	rinfo = kmalloc (sizeof (struct radeonfb_info), GFP_KERNEL);
 	if (!rinfo) {
-		printk ("radeonfb: could not allocate memory\n");
+		printk (KERN_ERR "radeonfb: could not allocate memory\n");
 		return -ENODEV;
 	}
 
@@ -2813,14 +2808,14 @@ static int radeonfb_pci_register (struct
 	/* request the mem regions */
 	if (!request_mem_region (rinfo->fb_base_phys,
 				 pci_resource_len(pdev, 0), "radeonfb")) {
-		printk ("radeonfb: cannot reserve FB region\n");
+		printk (KERN_ERR "radeonfb: cannot reserve FB region\n");
 		kfree (rinfo);
 		return -ENODEV;
 	}
 
 	if (!request_mem_region (rinfo->mmio_base_phys,
 				 pci_resource_len(pdev, 2), "radeonfb")) {
-		printk ("radeonfb: cannot reserve MMIO region\n");
+		printk (KERN_ERR "radeonfb: cannot reserve MMIO region\n");
 		release_mem_region (rinfo->fb_base_phys,
 				    pci_resource_len(pdev, 0));
 		kfree (rinfo);
@@ -2830,7 +2825,7 @@ static int radeonfb_pci_register (struct
 	/* map the regions */
 	rinfo->mmio_base = ioremap (rinfo->mmio_base_phys, RADEON_REGSIZE);
 	if (!rinfo->mmio_base) {
-		printk ("radeonfb: cannot map MMIO\n");
+		printk (KERN_ERR "radeonfb: cannot map MMIO\n");
 		release_mem_region (rinfo->mmio_base_phys,
 				    pci_resource_len(pdev, 2));
 		release_mem_region (rinfo->fb_base_phys,
@@ -2859,7 +2854,7 @@ static int radeonfb_pci_register (struct
 	}
 #endif
 	if (mirror)
-		printk("radeonfb: mirroring display to CRT\n");
+		pr_info("radeonfb: mirroring display to CRT\n");
 
 	/* framebuffer size */
 	tmp = INREG(CONFIG_MEMSIZE);
@@ -2967,7 +2962,7 @@ static int radeonfb_pci_register (struct
 
 	rinfo->fb_base = ioremap (rinfo->fb_base_phys, rinfo->video_ram);
 	if (!rinfo->fb_base) {
-		printk ("radeonfb: cannot map FB\n");
+		printk (KERN_ERR "radeonfb: cannot map FB\n");
 		iounmap(rinfo->mmio_base);
 		release_mem_region (rinfo->mmio_base_phys,
 				    pci_resource_len(pdev, 2));
@@ -3019,7 +3014,7 @@ static int radeonfb_pci_register (struct
 	board_list = rinfo;
 	((struct fb_info *) rinfo)->device = &pdev->dev;
 	if (register_framebuffer ((struct fb_info *) rinfo) < 0) {
-		printk ("radeonfb: could not register framebuffer\n");
+		printk (KERN_ERR "radeonfb: could not register framebuffer\n");
 		iounmap(rinfo->fb_base);
 		iounmap(rinfo->mmio_base);
 		release_mem_region (rinfo->mmio_base_phys,
@@ -3049,16 +3044,16 @@ static int radeonfb_pci_register (struct
 	}
 #endif
 
-	printk ("radeonfb: ATI Radeon %s %s %d MB\n", rinfo->name, rinfo->ram_type,
+	pr_info ("radeonfb: ATI Radeon %s %s %d MB\n", rinfo->name, rinfo->ram_type,
 		(rinfo->video_ram/(1024*1024)));
 
 	if (rinfo->hasCRTC2) {
-		printk("radeonfb: DVI port %s monitor connected\n",
+		pr_info("radeonfb: DVI port %s monitor connected\n",
 			GET_MON_NAME(rinfo->dviDisp_type));
-		printk("radeonfb: CRT port %s monitor connected\n",
+		pr_info("radeonfb: CRT port %s monitor connected\n",
 			GET_MON_NAME(rinfo->crtDisp_type));
 	} else {
-		printk("radeonfb: CRT port %s monitor connected\n",
+		pr_info("radeonfb: CRT port %s monitor connected\n",
 			GET_MON_NAME(rinfo->crtDisp_type));
 	}
 
_
