linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grazvydas Ignotas <notasas@gmail.com>
To: linux-fbdev@vger.kernel.org
Subject: [PATCH] fbdev: move FBIO_WAITFORVSYNC to linux/fb.h
Date: Fri, 16 Apr 2010 14:57:09 +0000	[thread overview]
Message-ID: <1271429829-23577-1-git-send-email-notasas@gmail.com> (raw)

FBIO_WAITFORVSYNC is currently implemented by matroxfb, atyfb, intelfb
and more. All of them keep redefining the same FBIO_WAITFORVSYNC macro
over and over again, so move it to linux/fb.h and clean up those
duplicate defines.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
 drivers/video/aty/atyfb_base.c        |    4 ----
 drivers/video/intelfb/intelfb.h       |    4 ----
 drivers/video/matrox/matroxfb_base.c  |    1 +
 drivers/video/matrox/matroxfb_crtc2.c |    1 +
 include/linux/fb.h                    |    2 ++
 include/linux/ivtvfb.h                |    1 -
 include/linux/matroxfb.h              |    2 --
 include/video/sh_mobile_lcdc.h        |    2 --
 8 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 29d7285..f8d69ad 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -1820,10 +1820,6 @@ struct atyclk {
 #define ATYIO_FEATW		0x41545903	/* ATY\03 */
 #endif
 
-#ifndef FBIO_WAITFORVSYNC
-#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
-#endif
-
 static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
 {
 	struct atyfb_par *par = (struct atyfb_par *) info->par;
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h
index 4098455..6b51175 100644
--- a/drivers/video/intelfb/intelfb.h
+++ b/drivers/video/intelfb/intelfb.h
@@ -371,10 +371,6 @@ struct intelfb_info {
 			((dinfo)->chipset = INTEL_965G) ||	\
 			((dinfo)->chipset = INTEL_965GM))
 
-#ifndef FBIO_WAITFORVSYNC
-#define FBIO_WAITFORVSYNC	_IOW('F', 0x20, __u32)
-#endif
-
 /*** function prototypes ***/
 
 extern int intelfb_var_to_depth(const struct fb_var_screeninfo *var);
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index 052dd9f..3a09978 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -112,6 +112,7 @@
 #include "matroxfb_crtc2.h"
 #include "matroxfb_g450.h"
 #include <linux/matroxfb.h>
+#include <linux/fb.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 #include <linux/uaccess.h>
diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
index d7112c3..aeb4e23 100644
--- a/drivers/video/matrox/matroxfb_crtc2.c
+++ b/drivers/video/matrox/matroxfb_crtc2.c
@@ -15,6 +15,7 @@
 #include "matroxfb_misc.h"
 #include "matroxfb_DAC1064.h"
 #include <linux/matroxfb.h>
+#include <linux/fb.h>
 #include <linux/slab.h>
 #include <linux/uaccess.h>
 
diff --git a/include/linux/fb.h b/include/linux/fb.h
index c10163b..c99a809 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -23,6 +23,8 @@ struct dentry;
 #else
 #define FBIO_CURSOR            _IOWR('F', 0x08, struct fb_cursor)
 #endif
+#define FBIO_WAITFORVSYNC	_IOW('F', 0x20, __u32)
+
 /* 0x4607-0x460B are defined below */
 /* #define FBIOGET_MONITORSPEC	0x460C */
 /* #define FBIOPUT_MONITORSPEC	0x460D */
diff --git a/include/linux/ivtvfb.h b/include/linux/ivtvfb.h
index 9d88b29..e8b92f6 100644
--- a/include/linux/ivtvfb.h
+++ b/include/linux/ivtvfb.h
@@ -33,6 +33,5 @@ struct ivtvfb_dma_frame {
 };
 
 #define IVTVFB_IOC_DMA_FRAME 	_IOW('V', BASE_VIDIOC_PRIVATE+0, struct ivtvfb_dma_frame)
-#define FBIO_WAITFORVSYNC	_IOW('F', 0x20, __u32)
 
 #endif
diff --git a/include/linux/matroxfb.h b/include/linux/matroxfb.h
index 2203121..98b1374 100644
--- a/include/linux/matroxfb.h
+++ b/include/linux/matroxfb.h
@@ -37,7 +37,5 @@ enum matroxfb_ctrl_id {
   MATROXFB_CID_LAST
 };
 
-#define FBIO_WAITFORVSYNC	_IOW('F', 0x20, __u32)
-
 #endif
 
diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h
index 2cc893f..2882054 100644
--- a/include/video/sh_mobile_lcdc.h
+++ b/include/video/sh_mobile_lcdc.h
@@ -34,8 +34,6 @@ enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL };
 #define LCDC_FLAGS_HSCNT (1 << 3) /* Disable HSYNC during VBLANK */
 #define LCDC_FLAGS_DWCNT (1 << 4) /* Disable dotclock during blanking */
 
-#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
-
 struct sh_mobile_lcdc_sys_bus_cfg {
 	unsigned long ldmt2r;
 	unsigned long ldmt3r;
-- 
1.6.3.3


             reply	other threads:[~2010-04-16 14:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16 14:57 Grazvydas Ignotas [this message]
2010-04-20  9:17 ` [PATCH] fbdev: move FBIO_WAITFORVSYNC to linux/fb.h Hiremath, Vaibhav
2010-04-20 22:54 ` Andrew Morton
2010-04-21  4:29 ` Hiremath, Vaibhav
2010-04-21 13:21 ` James Simmons
2010-04-21 13:36 ` Hiremath, Vaibhav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1271429829-23577-1-git-send-email-notasas@gmail.com \
    --to=notasas@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).