aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sis/sis_main.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-01-14 16:21:25 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-14 21:27:14 -0500
commit67a6680d64e18c7a1901f31ef747ea53b6cd986d (patch)
tree1d428eb19fdd393290348c63911c2974016ebc9d /drivers/video/sis/sis_main.c
parenta80da7389891d0eeacbd568a9b54f665fd424d14 (diff)
[PATCH] fbdev: Sanitize ->fb_ioctl prototype
The ioctl and file arguments to ->fb_mmap are totally unused and there's not reason a driver should need them. Also update the ->fb_compat_ioctl prototype to be the same as ->fb_mmap. Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/sis/sis_main.c')
-rw-r--r--drivers/video/sis/sis_main.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index dea1a46c67c4..8adf5bf91eee 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -1743,13 +1743,14 @@ sisfb_blank(int blank, struct fb_info *info)
1743 1743
1744/* ----------- FBDev related routines for all series ---------- */ 1744/* ----------- FBDev related routines for all series ---------- */
1745 1745
1746static int 1746#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
1747sisfb_ioctl(struct inode *inode, struct file *file, 1747static int sisfb_ioctl(struct fb_info *info, unsigned int cmd,
1748 unsigned int cmd, unsigned long arg, 1748 unsigned long arg)
1749#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) 1749#else
1750 int con, 1750static int sisfb_ioctl(struct inode *inode, struct file *file,
1751 unsigned int cmd, unsigned long arg,
1752 struct fb_info *info)
1751#endif 1753#endif
1752 struct fb_info *info)
1753{ 1754{
1754 struct sis_video_info *ivideo = (struct sis_video_info *)info->par; 1755 struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
1755 struct sis_memreq sismemreq; 1756 struct sis_memreq sismemreq;
@@ -1924,19 +1925,6 @@ sisfb_ioctl(struct inode *inode, struct file *file,
1924 return 0; 1925 return 0;
1925} 1926}
1926 1927
1927#ifdef SIS_NEW_CONFIG_COMPAT
1928static long
1929sisfb_compat_ioctl(struct file *f, unsigned int cmd, unsigned long arg, struct fb_info *info)
1930{
1931 int ret;
1932
1933 lock_kernel();
1934 ret = sisfb_ioctl(NULL, f, cmd, arg, info);
1935 unlock_kernel();
1936 return ret;
1937}
1938#endif
1939
1940static int 1928static int
1941sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, struct fb_info *info) 1929sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, struct fb_info *info)
1942{ 1930{
@@ -2007,7 +1995,7 @@ static struct fb_ops sisfb_ops = {
2007#endif 1995#endif
2008 .fb_sync = fbcon_sis_sync, 1996 .fb_sync = fbcon_sis_sync,
2009#ifdef SIS_NEW_CONFIG_COMPAT 1997#ifdef SIS_NEW_CONFIG_COMPAT
2010 .fb_compat_ioctl= sisfb_compat_ioctl, 1998 .fb_compat_ioctl= sisfb_ioctl,
2011#endif 1999#endif
2012 .fb_ioctl = sisfb_ioctl 2000 .fb_ioctl = sisfb_ioctl
2013}; 2001};