summaryrefslogtreecommitdiff
path: root/drivers/video/epson1355fb.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2007-05-08 07:39:02 (GMT)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 18:15:30 (GMT)
commit3f9b0880e4a96b02bc0131451f2f6231cd90bd94 (patch)
treea47339c46ab03918b24d501df54884c277326a74 /drivers/video/epson1355fb.c
parent87b4884935d387acc4c4418da6a75387bfcc24b9 (diff)
downloadlinux-3f9b0880e4a96b02bc0131451f2f6231cd90bd94.tar.xz
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.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c
index 37e297d..ca2c54c 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,
static ssize_t
-epson1355fb_read(struct file *file, char *buf, size_t count, loff_t * ppos)
+epson1355fb_read(struct fb_info *info, char *buf, size_t count, loff_t * ppos)
{
- struct inode *inode = file->f_path.dentry->d_inode;
- int fbidx = iminor(inode);
- struct fb_info *info = registered_fb[fbidx];
unsigned long p = *ppos;
- /* from fbmem.c except for our own copy_*_user */
- if (!info || !info->screen_base)
- return -ENODEV;
-
if (p >= info->fix.smem_len)
return 0;
if (count >= info->fix.smem_len)
@@ -434,20 +427,13 @@ epson1355fb_read(struct file *file, char *buf, size_t count, loff_t * ppos)
}
static ssize_t
-epson1355fb_write(struct file *file, const char *buf,
+epson1355fb_write(struct fb_info *info, const char *buf,
size_t count, loff_t * ppos)
{
- struct inode *inode = file->f_path.dentry->d_inode;
- int fbidx = iminor(inode);
- struct fb_info *info = registered_fb[fbidx];
unsigned long p = *ppos;
int err;
/* from fbmem.c except for our own copy_*_user */
- if (!info || !info->screen_base)
- return -ENODEV;
-
- /* from fbmem.c except for our own copy_*_user */
if (p > info->fix.smem_len)
return -ENOSPC;
if (count >= info->fix.smem_len)