Skip to content

Commit

Permalink
fbdev: move FBIO_WAITFORVSYNC to linux/fb.h
Browse files Browse the repository at this point in the history
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>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Maik Broemme <mbroemme@plusserver.de>
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: "Hiremath, Vaibhav" <hvaibhav@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Grazvydas Ignotas authored and Linus Torvalds committed May 25, 2010
1 parent 1f9c3e1 commit 49c39b4
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 14 deletions.
4 changes: 0 additions & 4 deletions drivers/video/aty/atyfb_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions drivers/video/intelfb/intelfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion include/linux/fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct dentry;
#define FBIOGET_HWCINFO 0x4616
#define FBIOPUT_MODEINFO 0x4617
#define FBIOGET_DISPINFO 0x4618

#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)

#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
#define FB_TYPE_PLANES 1 /* Non interleaved planes */
Expand Down
1 change: 0 additions & 1 deletion include/linux/ivtvfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions include/linux/matroxfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <asm/ioctl.h>
#include <linux/types.h>
#include <linux/videodev2.h>
#include <linux/fb.h>

struct matroxioc_output_mode {
__u32 output; /* which output */
Expand Down Expand Up @@ -37,7 +38,5 @@ enum matroxfb_ctrl_id {
MATROXFB_CID_LAST
};

#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)

#endif

2 changes: 0 additions & 2 deletions include/video/sh_mobile_lcdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 49c39b4

Please sign in to comment.