diff options
-rw-r--r-- | drivers/video/pxa3xx-gcu.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c index 4c318a34dfeb..97563c55af63 100644 --- a/drivers/video/pxa3xx-gcu.c +++ b/drivers/video/pxa3xx-gcu.c | |||
@@ -101,7 +101,6 @@ struct pxa3xx_gcu_priv { | |||
101 | dma_addr_t shared_phys; | 101 | dma_addr_t shared_phys; |
102 | struct resource *resource_mem; | 102 | struct resource *resource_mem; |
103 | struct miscdevice misc_dev; | 103 | struct miscdevice misc_dev; |
104 | struct file_operations misc_fops; | ||
105 | wait_queue_head_t wait_idle; | 104 | wait_queue_head_t wait_idle; |
106 | wait_queue_head_t wait_free; | 105 | wait_queue_head_t wait_free; |
107 | spinlock_t spinlock; | 106 | spinlock_t spinlock; |
@@ -577,6 +576,13 @@ free_buffers(struct platform_device *dev, | |||
577 | priv->free = NULL; | 576 | priv->free = NULL; |
578 | } | 577 | } |
579 | 578 | ||
579 | static const struct file_operations misc_fops = { | ||
580 | .owner = THIS_MODULE, | ||
581 | .write = pxa3xx_gcu_misc_write, | ||
582 | .unlocked_ioctl = pxa3xx_gcu_misc_ioctl, | ||
583 | .mmap = pxa3xx_gcu_misc_mmap | ||
584 | }; | ||
585 | |||
580 | static int pxa3xx_gcu_probe(struct platform_device *dev) | 586 | static int pxa3xx_gcu_probe(struct platform_device *dev) |
581 | { | 587 | { |
582 | int i, ret, irq; | 588 | int i, ret, irq; |
@@ -604,14 +610,9 @@ static int pxa3xx_gcu_probe(struct platform_device *dev) | |||
604 | * container_of(). This isn't really necessary as we have a fixed minor | 610 | * container_of(). This isn't really necessary as we have a fixed minor |
605 | * number anyway, but this is to avoid statics. */ | 611 | * number anyway, but this is to avoid statics. */ |
606 | 612 | ||
607 | priv->misc_fops.owner = THIS_MODULE; | ||
608 | priv->misc_fops.write = pxa3xx_gcu_misc_write; | ||
609 | priv->misc_fops.unlocked_ioctl = pxa3xx_gcu_misc_ioctl; | ||
610 | priv->misc_fops.mmap = pxa3xx_gcu_misc_mmap; | ||
611 | |||
612 | priv->misc_dev.minor = MISCDEV_MINOR, | 613 | priv->misc_dev.minor = MISCDEV_MINOR, |
613 | priv->misc_dev.name = DRV_NAME, | 614 | priv->misc_dev.name = DRV_NAME, |
614 | priv->misc_dev.fops = &priv->misc_fops, | 615 | priv->misc_dev.fops = &misc_fops, |
615 | 616 | ||
616 | /* register misc device */ | 617 | /* register misc device */ |
617 | ret = misc_register(&priv->misc_dev); | 618 | ret = misc_register(&priv->misc_dev); |