diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2007-05-08 03:39:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:30 -0400 |
commit | 3f9b0880e4a96b02bc0131451f2f6231cd90bd94 (patch) | |
tree | a47339c46ab03918b24d501df54884c277326a74 /drivers/video/arcfb.c | |
parent | 87b4884935d387acc4c4418da6a75387bfcc24b9 (diff) |
fbdev: pass struct fb_info to fb_read and fb_write
It is unnecessary to pass struct file to fb_read() and fb_write() in struct
fb_ops. For consistency with the other methods, pass struct fb_info instead.
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/arcfb.c')
-rw-r--r-- | drivers/video/arcfb.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 740b83b4bd8c..c668e56c9272 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c | |||
@@ -440,14 +440,11 @@ static int arcfb_ioctl(struct fb_info *info, | |||
440 | * the fb. it's inefficient for them to do anything less than 64*8 | 440 | * the fb. it's inefficient for them to do anything less than 64*8 |
441 | * writes since we update the lcd in each write() anyway. | 441 | * writes since we update the lcd in each write() anyway. |
442 | */ | 442 | */ |
443 | static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t count, | 443 | static ssize_t arcfb_write(struct fb_info *info, const char __user *buf, |
444 | loff_t *ppos) | 444 | size_t count, loff_t *ppos) |
445 | { | 445 | { |
446 | /* modded from epson 1355 */ | 446 | /* modded from epson 1355 */ |
447 | 447 | ||
448 | struct inode *inode; | ||
449 | int fbidx; | ||
450 | struct fb_info *info; | ||
451 | unsigned long p; | 448 | unsigned long p; |
452 | int err=-EINVAL; | 449 | int err=-EINVAL; |
453 | unsigned int fbmemlength,x,y,w,h, bitppos, startpos, endpos, bitcount; | 450 | unsigned int fbmemlength,x,y,w,h, bitppos, startpos, endpos, bitcount; |
@@ -455,13 +452,6 @@ static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t cou | |||
455 | unsigned int xres; | 452 | unsigned int xres; |
456 | 453 | ||
457 | p = *ppos; | 454 | p = *ppos; |
458 | inode = file->f_path.dentry->d_inode; | ||
459 | fbidx = iminor(inode); | ||
460 | info = registered_fb[fbidx]; | ||
461 | |||
462 | if (!info || !info->screen_base) | ||
463 | return -ENODEV; | ||
464 | |||
465 | par = info->par; | 455 | par = info->par; |
466 | xres = info->var.xres; | 456 | xres = info->var.xres; |
467 | fbmemlength = (xres * info->var.yres)/8; | 457 | fbmemlength = (xres * info->var.yres)/8; |