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>
This commit is contained in:

committed by
Linus Torvalds

parent
87b4884935
commit
3f9b0880e4
@@ -440,14 +440,11 @@ static int arcfb_ioctl(struct fb_info *info,
|
||||
* the fb. it's inefficient for them to do anything less than 64*8
|
||||
* writes since we update the lcd in each write() anyway.
|
||||
*/
|
||||
static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t count,
|
||||
loff_t *ppos)
|
||||
static ssize_t arcfb_write(struct fb_info *info, const char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
/* modded from epson 1355 */
|
||||
|
||||
struct inode *inode;
|
||||
int fbidx;
|
||||
struct fb_info *info;
|
||||
unsigned long p;
|
||||
int err=-EINVAL;
|
||||
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
|
||||
unsigned int xres;
|
||||
|
||||
p = *ppos;
|
||||
inode = file->f_path.dentry->d_inode;
|
||||
fbidx = iminor(inode);
|
||||
info = registered_fb[fbidx];
|
||||
|
||||
if (!info || !info->screen_base)
|
||||
return -ENODEV;
|
||||
|
||||
par = info->par;
|
||||
xres = info->var.xres;
|
||||
fbmemlength = (xres * info->var.yres)/8;
|
||||
|
Reference in New Issue
Block a user