Skip to content

drivers: add LCD support

Miguel Ojeda Sandonis lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 1 patch 0 repliesNew

Patches in v1 No applies recorded yet

The patch the cover letter announces is not in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1 update8] drivers: add LCD support

Andrew, another one for drivers-add-lcd-support saga. Thanks you.
---

- add "depends on x86" until some solution to d-cache aliasing is provided

- use the new and simpler vm_insert_page()
instead of nopage() related code

 drivers/auxdisplay/Kconfig        |    1 +
 drivers/auxdisplay/cfag12864bfb.c |   21 ++-------------------
 2 files changed, 3 insertions(+), 19 deletions(-)

drivers-add-lcd-support-update8.patch

---

drivers/auxdisplay/Kconfig +1 -0
index ee30c48..8d41f72 100644
@@ -64,6 +64,7 @@ config KS0108_DELAY
 
 config CFAG12864B
 	tristate "CFAG12864B LCD"
+	depends on X86
 	depends on KS0108
 	default n
 	---help---
drivers/auxdisplay/cfag12864bfb.c +2 -19
index 87b86af..94765e7 100644
@@ -65,27 +65,10 @@ static struct fb_var_screeninfo cfag1286
 	.vmode = FB_VMODE_NONINTERLACED,
 };
 
-static struct page *cfag12864bfb_vma_nopage(struct vm_area_struct *vma,
-	unsigned long address, int *type)
-{
-	struct page *page = virt_to_page(cfag12864b_buffer);
-	get_page(page);
-
-	if (type)
-		*type = VM_FAULT_MINOR;
-
-	return page;
-}
-
-static struct vm_operations_struct cfag12864bfb_vm_ops = {
-	.nopage = cfag12864bfb_vma_nopage,
-};
-
 static int cfag12864bfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
 {
-	vma->vm_ops = &cfag12864bfb_vm_ops;
-	vma->vm_flags |= VM_RESERVED;
-	return 0;
+	return vm_insert_page(vma, vma->vm_start,
+		virt_to_page(cfag12864b_buffer));
 }
 
 static struct fb_ops cfag12864bfb_ops = {