Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: move FBIO_WAITFORVSYNC to linux/fb.h

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>

authored by

Grazvydas Ignotas and committed by
Linus Torvalds
49c39b49 1f9c3e1f

+2 -14
-4
drivers/video/aty/atyfb_base.c
··· 1820 1820 #define ATYIO_FEATW 0x41545903 /* ATY\03 */ 1821 1821 #endif 1822 1822 1823 - #ifndef FBIO_WAITFORVSYNC 1824 - #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) 1825 - #endif 1826 - 1827 1823 static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) 1828 1824 { 1829 1825 struct atyfb_par *par = (struct atyfb_par *) info->par;
-4
drivers/video/intelfb/intelfb.h
··· 371 371 ((dinfo)->chipset == INTEL_965G) || \ 372 372 ((dinfo)->chipset == INTEL_965GM)) 373 373 374 - #ifndef FBIO_WAITFORVSYNC 375 - #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) 376 - #endif 377 - 378 374 /*** function prototypes ***/ 379 375 380 376 extern int intelfb_var_to_depth(const struct fb_var_screeninfo *var);
+1 -1
include/linux/fb.h
··· 37 37 #define FBIOGET_HWCINFO 0x4616 38 38 #define FBIOPUT_MODEINFO 0x4617 39 39 #define FBIOGET_DISPINFO 0x4618 40 - 40 + #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) 41 41 42 42 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ 43 43 #define FB_TYPE_PLANES 1 /* Non interleaved planes */
-1
include/linux/ivtvfb.h
··· 33 33 }; 34 34 35 35 #define IVTVFB_IOC_DMA_FRAME _IOW('V', BASE_VIDIOC_PRIVATE+0, struct ivtvfb_dma_frame) 36 - #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) 37 36 38 37 #endif
+1 -2
include/linux/matroxfb.h
··· 4 4 #include <asm/ioctl.h> 5 5 #include <linux/types.h> 6 6 #include <linux/videodev2.h> 7 + #include <linux/fb.h> 7 8 8 9 struct matroxioc_output_mode { 9 10 __u32 output; /* which output */ ··· 37 36 MATROXFB_CID_DEFLICKER, 38 37 MATROXFB_CID_LAST 39 38 }; 40 - 41 - #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) 42 39 43 40 #endif 44 41
-2
include/video/sh_mobile_lcdc.h
··· 34 34 #define LCDC_FLAGS_HSCNT (1 << 3) /* Disable HSYNC during VBLANK */ 35 35 #define LCDC_FLAGS_DWCNT (1 << 4) /* Disable dotclock during blanking */ 36 36 37 - #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) 38 - 39 37 struct sh_mobile_lcdc_sys_bus_cfg { 40 38 unsigned long ldmt2r; 41 39 unsigned long ldmt3r;