aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/fb_defio.c4
-rw-r--r--drivers/video/smscufx.c2
-rw-r--r--drivers/video/udlfb.c2
-rw-r--r--include/linux/fb.h1
4 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c
index c27e153d8882..070f26f0bf99 100644
--- a/drivers/video/fb_defio.c
+++ b/drivers/video/fb_defio.c
@@ -107,6 +107,10 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma,
107 /* protect against the workqueue changing the page list */ 107 /* protect against the workqueue changing the page list */
108 mutex_lock(&fbdefio->lock); 108 mutex_lock(&fbdefio->lock);
109 109
110 /* first write in this cycle, notify the driver */
111 if (fbdefio->first_io && list_empty(&fbdefio->pagelist))
112 fbdefio->first_io(info);
113
110 /* 114 /*
111 * We want the page to remain locked from ->page_mkwrite until 115 * We want the page to remain locked from ->page_mkwrite until
112 * the PTE is marked dirty to avoid page_mkclean() being called 116 * the PTE is marked dirty to avoid page_mkclean() being called
diff --git a/drivers/video/smscufx.c b/drivers/video/smscufx.c
index ccbfef5e828f..99857857f6fa 100644
--- a/drivers/video/smscufx.c
+++ b/drivers/video/smscufx.c
@@ -1083,7 +1083,7 @@ static int ufx_ops_open(struct fb_info *info, int user)
1083 1083
1084 struct fb_deferred_io *fbdefio; 1084 struct fb_deferred_io *fbdefio;
1085 1085
1086 fbdefio = kmalloc(sizeof(struct fb_deferred_io), GFP_KERNEL); 1086 fbdefio = kzalloc(sizeof(struct fb_deferred_io), GFP_KERNEL);
1087 1087
1088 if (fbdefio) { 1088 if (fbdefio) {
1089 fbdefio->delay = UFX_DEFIO_WRITE_DELAY; 1089 fbdefio->delay = UFX_DEFIO_WRITE_DELAY;
diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c
index a159b63e18b9..e9d43b403432 100644
--- a/drivers/video/udlfb.c
+++ b/drivers/video/udlfb.c
@@ -893,7 +893,7 @@ static int dlfb_ops_open(struct fb_info *info, int user)
893 893
894 struct fb_deferred_io *fbdefio; 894 struct fb_deferred_io *fbdefio;
895 895
896 fbdefio = kmalloc(sizeof(struct fb_deferred_io), GFP_KERNEL); 896 fbdefio = kzalloc(sizeof(struct fb_deferred_io), GFP_KERNEL);
897 897
898 if (fbdefio) { 898 if (fbdefio) {
899 fbdefio->delay = DL_DEFIO_WRITE_DELAY; 899 fbdefio->delay = DL_DEFIO_WRITE_DELAY;
diff --git a/include/linux/fb.h b/include/linux/fb.h
index d31cb682e173..c10e71efb8f5 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -607,6 +607,7 @@ struct fb_deferred_io {
607 struct mutex lock; /* mutex that protects the page list */ 607 struct mutex lock; /* mutex that protects the page list */
608 struct list_head pagelist; /* list of touched pages */ 608 struct list_head pagelist; /* list of touched pages */
609 /* callback */ 609 /* callback */
610 void (*first_io)(struct fb_info *info);
610 void (*deferred_io)(struct fb_info *info, struct list_head *pagelist); 611 void (*deferred_io)(struct fb_info *info, struct list_head *pagelist);
611}; 612};
612#endif 613#endif