Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370049
b: refs/heads/master
c: 996142e
h: refs/heads/master
i:
  370047: 681d71d
v: v3
  • Loading branch information
Al Viro committed Apr 9, 2013
1 parent 30f01ad commit cc08cb8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 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: 7294b0bb694c4376cad819bb97f2796626f50551
refs/heads/master: 996142e61d11fc1c1bea2834a36116c9a0fae029
21 changes: 12 additions & 9 deletions trunk/drivers/video/pxa3xx-gcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,20 @@ pxa3xx_gcu_wait_free(struct pxa3xx_gcu_priv *priv)

/* Misc device layer */

static inline struct pxa3xx_gcu_priv *file_dev(struct file *file)
{
struct miscdevice *dev = file->private_data;
return container_of(dev, struct pxa3xx_gcu_priv, misc_dev);
}

static ssize_t
pxa3xx_gcu_misc_write(struct file *filp, const char *buff,
pxa3xx_gcu_misc_write(struct file *file, const char *buff,
size_t count, loff_t *offp)
{
int ret;
unsigned long flags;
struct pxa3xx_gcu_batch *buffer;
struct pxa3xx_gcu_priv *priv =
container_of(filp->f_op, struct pxa3xx_gcu_priv, misc_fops);
struct pxa3xx_gcu_priv *priv = file_dev(file);

int words = count / 4;

Expand Down Expand Up @@ -450,11 +455,10 @@ pxa3xx_gcu_misc_write(struct file *filp, const char *buff,


static long
pxa3xx_gcu_misc_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
pxa3xx_gcu_misc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
unsigned long flags;
struct pxa3xx_gcu_priv *priv =
container_of(filp->f_op, struct pxa3xx_gcu_priv, misc_fops);
struct pxa3xx_gcu_priv *priv = file_dev(file);

switch (cmd) {
case PXA3XX_GCU_IOCTL_RESET:
Expand All @@ -471,11 +475,10 @@ pxa3xx_gcu_misc_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
}

static int
pxa3xx_gcu_misc_mmap(struct file *filp, struct vm_area_struct *vma)
pxa3xx_gcu_misc_mmap(struct file *file, struct vm_area_struct *vma)
{
unsigned int size = vma->vm_end - vma->vm_start;
struct pxa3xx_gcu_priv *priv =
container_of(filp->f_op, struct pxa3xx_gcu_priv, misc_fops);
struct pxa3xx_gcu_priv *priv = file_dev(file);

switch (vma->vm_pgoff) {
case 0:
Expand Down

0 comments on commit cc08cb8

Please sign in to comment.