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/epson1355fb.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/epson1355fb.c')
-rw-r--r-- | drivers/video/epson1355fb.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c index 37e297d7feb7..ca2c54ce508e 100644 --- a/drivers/video/epson1355fb.c +++ b/drivers/video/epson1355fb.c | |||
@@ -403,17 +403,10 @@ static inline unsigned long copy_to_user16(void *to, const void *from, | |||
403 | 403 | ||
404 | 404 | ||
405 | static ssize_t | 405 | static ssize_t |
406 | epson1355fb_read(struct file *file, char *buf, size_t count, loff_t * ppos) | 406 | epson1355fb_read(struct fb_info *info, char *buf, size_t count, loff_t * ppos) |
407 | { | 407 | { |
408 | struct inode *inode = file->f_path.dentry->d_inode; | ||
409 | int fbidx = iminor(inode); | ||
410 | struct fb_info *info = registered_fb[fbidx]; | ||
411 | unsigned long p = *ppos; | 408 | unsigned long p = *ppos; |
412 | 409 | ||
413 | /* from fbmem.c except for our own copy_*_user */ | ||
414 | if (!info || !info->screen_base) | ||
415 | return -ENODEV; | ||
416 | |||
417 | if (p >= info->fix.smem_len) | 410 | if (p >= info->fix.smem_len) |
418 | return 0; | 411 | return 0; |
419 | if (count >= info->fix.smem_len) | 412 | if (count >= info->fix.smem_len) |
@@ -434,20 +427,13 @@ epson1355fb_read(struct file *file, char *buf, size_t count, loff_t * ppos) | |||
434 | } | 427 | } |
435 | 428 | ||
436 | static ssize_t | 429 | static ssize_t |
437 | epson1355fb_write(struct file *file, const char *buf, | 430 | epson1355fb_write(struct fb_info *info, const char *buf, |
438 | size_t count, loff_t * ppos) | 431 | size_t count, loff_t * ppos) |
439 | { | 432 | { |
440 | struct inode *inode = file->f_path.dentry->d_inode; | ||
441 | int fbidx = iminor(inode); | ||
442 | struct fb_info *info = registered_fb[fbidx]; | ||
443 | unsigned long p = *ppos; | 433 | unsigned long p = *ppos; |
444 | int err; | 434 | int err; |
445 | 435 | ||
446 | /* from fbmem.c except for our own copy_*_user */ | 436 | /* from fbmem.c except for our own copy_*_user */ |
447 | if (!info || !info->screen_base) | ||
448 | return -ENODEV; | ||
449 | |||
450 | /* from fbmem.c except for our own copy_*_user */ | ||
451 | if (p > info->fix.smem_len) | 437 | if (p > info->fix.smem_len) |
452 | return -ENOSPC; | 438 | return -ENOSPC; |
453 | if (count >= info->fix.smem_len) | 439 | if (count >= info->fix.smem_len) |