|
@@ -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,19 +427,12 @@ 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;
|