From: Imre Deak Date: Wed, 1 Mar 2006 11:18:16 +0000 (+0200) Subject: omapfb: fix IOCTL parameter types X-Git-Tag: v2.6.16-omap1~41 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=108f6c0f6e2cdddfe6070e851a4f3fbcadbb0b0c;p=linux-2.6-omap-h63xx.git omapfb: fix IOCTL parameter types IOCTL parameters shouldn't be of an enum type, replace them with int. This also fixes up the places where u8, u16, u32 was used instead of __u8, __u16, __u32 for things used by user space. This solves a bug for IOCTL code mismatch between kernel and user space because the toolchains used generated different value for sizeof(enum xxx) and this size is encoded in the IOCTL code. Signed-off-by: Imre Deak Signed-off-by: Juha Yrjölä --- diff --git a/include/asm-arm/arch-omap/omapfb.h b/include/asm-arm/arch-omap/omapfb.h index 3c3722ffbd4..7eade7be175 100644 --- a/include/asm-arm/arch-omap/omapfb.h +++ b/include/asm-arm/arch-omap/omapfb.h @@ -34,10 +34,10 @@ #define OMAPFB_MIRROR OMAP_IOW(31, int) #define OMAPFB_SYNC_GFX OMAP_IO(37) #define OMAPFB_VSYNC OMAP_IO(38) -#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, enum omapfb_update_mode) +#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int) #define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(41, struct omapfb_update_window_old) #define OMAPFB_GET_CAPS OMAP_IOR(42, unsigned long) -#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, enum omapfb_update_mode) +#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int) #define OMAPFB_LCD_TEST OMAP_IOW(45, int) #define OMAPFB_CTRL_TEST OMAP_IOW(46, int) #define OMAPFB_UPDATE_WINDOW OMAP_IOW(47, struct omapfb_update_window) @@ -67,14 +67,14 @@ enum omapfb_color_format { }; struct omapfb_update_window { - u32 x, y; - u32 width, height; - u32 format; + __u32 x, y; + __u32 width, height; + __u32 format; }; struct omapfb_update_window_old { - u32 x, y; - u32 width, height; + __u32 x, y; + __u32 width, height; }; enum omapfb_plane { @@ -89,17 +89,17 @@ enum omapfb_channel_out { }; struct omapfb_setup_plane { - u8 plane; - u8 channel_out; - u32 offset; - u32 pos_x, pos_y; - u32 width, height; - u32 color_mode; + __u8 plane; + __u8 channel_out; + __u32 offset; + __u32 pos_x, pos_y; + __u32 width, height; + __u32 color_mode; }; struct omapfb_enable_plane { - u8 plane; - u8 enable; + __u8 plane; + __u8 enable; }; enum omapfb_color_key_type { @@ -109,10 +109,10 @@ enum omapfb_color_key_type { }; struct omapfb_color_key { - u8 channel_out; - u32 background; - u32 trans_key; - u8 key_type; + __u8 channel_out; + __u32 background; + __u32 trans_key; + __u8 key_type; }; enum omapfb_update_mode {