diff options
| -rw-r--r-- | drivers/video/sbuslib.c | 25 | ||||
| -rw-r--r-- | fs/compat_ioctl.c | 20 | ||||
| -rw-r--r-- | include/asm-sparc64/fbio.h | 28 |
3 files changed, 48 insertions, 25 deletions
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 34ef859ee414..963a454b7074 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c | |||
| @@ -190,17 +190,6 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, | |||
| 190 | EXPORT_SYMBOL(sbusfb_ioctl_helper); | 190 | EXPORT_SYMBOL(sbusfb_ioctl_helper); |
| 191 | 191 | ||
| 192 | #ifdef CONFIG_COMPAT | 192 | #ifdef CONFIG_COMPAT |
| 193 | struct fbcmap32 { | ||
| 194 | int index; /* first element (0 origin) */ | ||
| 195 | int count; | ||
| 196 | u32 red; | ||
| 197 | u32 green; | ||
| 198 | u32 blue; | ||
| 199 | }; | ||
| 200 | |||
| 201 | #define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) | ||
| 202 | #define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) | ||
| 203 | |||
| 204 | static int fbiogetputcmap(struct fb_info *info, unsigned int cmd, unsigned long arg) | 193 | static int fbiogetputcmap(struct fb_info *info, unsigned int cmd, unsigned long arg) |
| 205 | { | 194 | { |
| 206 | struct fbcmap32 __user *argp = (void __user *)arg; | 195 | struct fbcmap32 __user *argp = (void __user *)arg; |
| @@ -223,20 +212,6 @@ static int fbiogetputcmap(struct fb_info *info, unsigned int cmd, unsigned long | |||
| 223 | (unsigned long)p); | 212 | (unsigned long)p); |
| 224 | } | 213 | } |
| 225 | 214 | ||
| 226 | struct fbcursor32 { | ||
| 227 | short set; /* what to set, choose from the list above */ | ||
| 228 | short enable; /* cursor on/off */ | ||
| 229 | struct fbcurpos pos; /* cursor position */ | ||
| 230 | struct fbcurpos hot; /* cursor hot spot */ | ||
| 231 | struct fbcmap32 cmap; /* color map info */ | ||
| 232 | struct fbcurpos size; /* cursor bit map size */ | ||
| 233 | u32 image; /* cursor image bits */ | ||
| 234 | u32 mask; /* cursor mask bits */ | ||
| 235 | }; | ||
| 236 | |||
| 237 | #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) | ||
| 238 | #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) | ||
| 239 | |||
| 240 | static int fbiogscursor(struct fb_info *info, unsigned long arg) | 215 | static int fbiogscursor(struct fb_info *info, unsigned long arg) |
| 241 | { | 216 | { |
| 242 | struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p)); | 217 | struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p)); |
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index e440a7b95d02..2bc1428d621c 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
| @@ -115,6 +115,10 @@ | |||
| 115 | #include <linux/dvb/video.h> | 115 | #include <linux/dvb/video.h> |
| 116 | #include <linux/lp.h> | 116 | #include <linux/lp.h> |
| 117 | 117 | ||
| 118 | #ifdef CONFIG_SPARC | ||
| 119 | #include <asm/fbio.h> | ||
| 120 | #endif | ||
| 121 | |||
| 118 | static int do_ioctl32_pointer(unsigned int fd, unsigned int cmd, | 122 | static int do_ioctl32_pointer(unsigned int fd, unsigned int cmd, |
| 119 | unsigned long arg, struct file *f) | 123 | unsigned long arg, struct file *f) |
| 120 | { | 124 | { |
| @@ -3493,6 +3497,22 @@ IGNORE_IOCTL(VFAT_IOCTL_READDIR_SHORT32) | |||
| 3493 | 3497 | ||
| 3494 | /* loop */ | 3498 | /* loop */ |
| 3495 | IGNORE_IOCTL(LOOP_CLR_FD) | 3499 | IGNORE_IOCTL(LOOP_CLR_FD) |
| 3500 | |||
| 3501 | #ifdef CONFIG_SPARC | ||
| 3502 | /* Sparc framebuffers, handled in sbusfb_compat_ioctl() */ | ||
| 3503 | IGNORE_IOCTL(FBIOGTYPE) | ||
| 3504 | IGNORE_IOCTL(FBIOSATTR) | ||
| 3505 | IGNORE_IOCTL(FBIOGATTR) | ||
| 3506 | IGNORE_IOCTL(FBIOSVIDEO) | ||
| 3507 | IGNORE_IOCTL(FBIOGVIDEO) | ||
| 3508 | IGNORE_IOCTL(FBIOSCURPOS) | ||
| 3509 | IGNORE_IOCTL(FBIOGCURPOS) | ||
| 3510 | IGNORE_IOCTL(FBIOGCURMAX) | ||
| 3511 | IGNORE_IOCTL(FBIOPUTCMAP32) | ||
| 3512 | IGNORE_IOCTL(FBIOGETCMAP32) | ||
| 3513 | IGNORE_IOCTL(FBIOSCURSOR32) | ||
| 3514 | IGNORE_IOCTL(FBIOGCURSOR32) | ||
| 3515 | #endif | ||
| 3496 | }; | 3516 | }; |
| 3497 | 3517 | ||
| 3498 | #define IOCTL_HASHSIZE 256 | 3518 | #define IOCTL_HASHSIZE 256 |
diff --git a/include/asm-sparc64/fbio.h b/include/asm-sparc64/fbio.h index 500026d9f6e1..b9215a0907d3 100644 --- a/include/asm-sparc64/fbio.h +++ b/include/asm-sparc64/fbio.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define __LINUX_FBIO_H | 2 | #define __LINUX_FBIO_H |
| 3 | 3 | ||
| 4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
| 5 | #include <linux/types.h> | ||
| 5 | 6 | ||
| 6 | /* Constants used for fbio SunOS compatibility */ | 7 | /* Constants used for fbio SunOS compatibility */ |
| 7 | /* (C) 1996 Miguel de Icaza */ | 8 | /* (C) 1996 Miguel de Icaza */ |
| @@ -299,4 +300,31 @@ struct fb_clut32 { | |||
| 299 | #define LEO_LD_GBL_MAP 0x01009000 | 300 | #define LEO_LD_GBL_MAP 0x01009000 |
| 300 | #define LEO_UNK2_MAP 0x0100a000 | 301 | #define LEO_UNK2_MAP 0x0100a000 |
| 301 | 302 | ||
| 303 | #ifdef __KERNEL__ | ||
| 304 | struct fbcmap32 { | ||
| 305 | int index; /* first element (0 origin) */ | ||
| 306 | int count; | ||
| 307 | u32 red; | ||
| 308 | u32 green; | ||
| 309 | u32 blue; | ||
| 310 | }; | ||
| 311 | |||
| 312 | #define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) | ||
| 313 | #define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) | ||
| 314 | |||
| 315 | struct fbcursor32 { | ||
| 316 | short set; /* what to set, choose from the list above */ | ||
| 317 | short enable; /* cursor on/off */ | ||
| 318 | struct fbcurpos pos; /* cursor position */ | ||
| 319 | struct fbcurpos hot; /* cursor hot spot */ | ||
| 320 | struct fbcmap32 cmap; /* color map info */ | ||
| 321 | struct fbcurpos size; /* cursor bit map size */ | ||
| 322 | u32 image; /* cursor image bits */ | ||
| 323 | u32 mask; /* cursor mask bits */ | ||
| 324 | }; | ||
| 325 | |||
| 326 | #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) | ||
| 327 | #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) | ||
| 328 | #endif | ||
| 329 | |||
| 302 | #endif /* __LINUX_FBIO_H */ | 330 | #endif /* __LINUX_FBIO_H */ |
