Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54930
b: refs/heads/master
c: 3f9b088
h: refs/heads/master
v: v3
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed May 8, 2007
1 parent 3c6ca7e commit 6f771ec
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 46 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87b4884935d387acc4c4418da6a75387bfcc24b9
refs/heads/master: 3f9b0880e4a96b02bc0131451f2f6231cd90bd94
14 changes: 2 additions & 12 deletions trunk/drivers/video/arcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,28 +440,18 @@ 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;
struct arcfb_par *par;
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;
Expand Down
18 changes: 2 additions & 16 deletions trunk/drivers/video/epson1355fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ fb_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
return -EPERM;

if (info->fbops->fb_read)
return info->fbops->fb_read(file, buf, count, ppos);
return info->fbops->fb_read(info, buf, count, ppos);

total_size = info->screen_size;

Expand Down Expand Up @@ -663,7 +663,7 @@ fb_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
return -EPERM;

if (info->fbops->fb_write)
return info->fbops->fb_write(file, buf, count, ppos);
return info->fbops->fb_write(info, buf, count, ppos);

total_size = info->screen_size;

Expand Down
12 changes: 1 addition & 11 deletions trunk/drivers/video/hecubafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,26 +267,16 @@ static void hecubafb_imageblit(struct fb_info *info,
* this is the slow path from userspace. they can seek and write to
* the fb. it's inefficient to do anything less than a full screen draw
*/
static ssize_t hecubafb_write(struct file *file, const char __user *buf,
static ssize_t hecubafb_write(struct fb_info *info, const char __user *buf,
size_t count, loff_t *ppos)
{
struct inode *inode;
int fbidx;
struct fb_info *info;
unsigned long p;
int err=-EINVAL;
struct hecubafb_par *par;
unsigned int xres;
unsigned int fbmemlength;

p = *ppos;
inode = file->f_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;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/video/pvr2fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static int pvr2_init_cable(void);
static int pvr2_get_param(const struct pvr2_params *p, const char *s,
int val, int size);
#ifdef CONFIG_SH_DMA
static ssize_t pvr2fb_write(struct file *file, const char *buf,
static ssize_t pvr2fb_write(struct fb_info *info, const char *buf,
size_t count, loff_t *ppos);
#endif

Expand Down Expand Up @@ -674,7 +674,7 @@ static int pvr2_init_cable(void)
}

#ifdef CONFIG_SH_DMA
static ssize_t pvr2fb_write(struct file *file, const char *buf,
static ssize_t pvr2fb_write(struct fb_info *info, const char *buf,
size_t count, loff_t *ppos)
{
unsigned long dst, start, end, len;
Expand Down
6 changes: 4 additions & 2 deletions trunk/include/linux/fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,10 @@ struct fb_ops {
/* For framebuffers with strange non linear layouts or that do not
* work with normal memory mapped access
*/
ssize_t (*fb_read)(struct file *file, char __user *buf, size_t count, loff_t *ppos);
ssize_t (*fb_write)(struct file *file, const char __user *buf, size_t count, loff_t *ppos);
ssize_t (*fb_read)(struct fb_info *info, char __user *buf,
size_t count, loff_t *ppos);
ssize_t (*fb_write)(struct fb_info *info, const char __user *buf,
size_t count, loff_t *ppos);

/* checks var and eventually tweaks it to something supported,
* DO NOT MODIFY PAR */
Expand Down

0 comments on commit 6f771ec

Please sign in to comment.