1
From: Bernie Thompson <bernie@plugable.com>
2
Date: Mon, 15 Feb 2010 14:46:48 +0000 (-0800)
3
Subject: Staging: udlfb: remove printk and small cleanup
5
commit bd80816b2877879d36011815858c8681408cc625 upstream.
7
Remove last remaining printk and clarify comments
9
Signed-off-by: Bernie Thompson <bernie@plugable.com>
10
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
14
index baad03a..8f6223c 100644
15
--- a/drivers/staging/udlfb/udlfb.c
16
+++ b/drivers/staging/udlfb/udlfb.c
17
@@ -83,8 +83,8 @@ static struct fb_deferred_io dlfb_defio;
21
- * Inserts a specific DisplayLink controller command into the provided
23
+ * All DisplayLink bulk operations start with 0xAF, followed by specific code
24
+ * All operations are written to buffers which then later get sent to device
26
static char *dlfb_set_register(char *buf, u8 reg, u8 val)
28
@@ -129,6 +129,10 @@ static char *dlfb_set_base16bpp(char *wrptr, u32 base)
29
return dlfb_set_register(wrptr, 0x22, base);
33
+ * DisplayLink HW has separate 16bpp and 8bpp framebuffers.
34
+ * In 24bpp modes, the low 323 RGB bits go in the 8bpp framebuffer
36
static char *dlfb_set_base8bpp(char *wrptr, u32 base)
38
wrptr = dlfb_set_register(wrptr, 0x26, base >> 16);
39
@@ -161,7 +165,7 @@ static char *dlfb_set_register_16be(char *wrptr, u8 reg, u16 value)
40
* same actual count. This makes sense once you read above a couple of
41
* times and think about it from a hardware perspective.
43
-static u16 lfsr16(u16 actual_count)
44
+static u16 dlfb_lfsr16(u16 actual_count)
46
u32 lv = 0xFFFF; /* This is the lfsr value that the hw starts with */
48
@@ -180,7 +184,7 @@ static u16 lfsr16(u16 actual_count)
50
static char *dlfb_set_register_lfsr16(char *wrptr, u8 reg, u16 value)
52
- return dlfb_set_register_16(wrptr, reg, lfsr16(value));
53
+ return dlfb_set_register_16(wrptr, reg, dlfb_lfsr16(value));
57
@@ -292,8 +296,9 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma)
58
unsigned long size = vma->vm_end - vma->vm_start;
59
unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
60
unsigned long page, pos;
61
+ struct dlfb_data *dev = info->par;
63
- printk("MMAP: %lu %u\n", offset + size, info->fix.smem_len);
64
+ dl_notice("MMAP: %lu %u\n", offset + size, info->fix.smem_len);
66
if (offset + size > info->fix.smem_len)