diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-06 04:44:08 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 22:16:40 +0400 |
commit | 264bd6602edd9f309c67685770bc1c8103699428 (patch) | |
tree | f1686eace91e120742e70056ef1d54b691a791f0 /drivers/video/pxa3xx-gcu.c | |
parent | 996142e61d11fc1c1bea2834a36116c9a0fae029 (diff) | |
download | linux-264bd6602edd9f309c67685770bc1c8103699428.tar.xz |
pxa3xx-gcu: stop embedding file_operations into device-private object
no need to do that anymore...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/video/pxa3xx-gcu.c')
-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 { dma_addr_t shared_phys; struct resource *resource_mem; struct miscdevice misc_dev; - struct file_operations misc_fops; wait_queue_head_t wait_idle; wait_queue_head_t wait_free; spinlock_t spinlock; @@ -577,6 +576,13 @@ free_buffers(struct platform_device *dev, priv->free = NULL; } +static const struct file_operations misc_fops = { + .owner = THIS_MODULE, + .write = pxa3xx_gcu_misc_write, + .unlocked_ioctl = pxa3xx_gcu_misc_ioctl, + .mmap = pxa3xx_gcu_misc_mmap +}; + static int pxa3xx_gcu_probe(struct platform_device *dev) { int i, ret, irq; @@ -604,14 +610,9 @@ static int pxa3xx_gcu_probe(struct platform_device *dev) * container_of(). This isn't really necessary as we have a fixed minor * number anyway, but this is to avoid statics. */ - priv->misc_fops.owner = THIS_MODULE; - priv->misc_fops.write = pxa3xx_gcu_misc_write; - priv->misc_fops.unlocked_ioctl = pxa3xx_gcu_misc_ioctl; - priv->misc_fops.mmap = pxa3xx_gcu_misc_mmap; - priv->misc_dev.minor = MISCDEV_MINOR, priv->misc_dev.name = DRV_NAME, - priv->misc_dev.fops = &priv->misc_fops, + priv->misc_dev.fops = &misc_fops, /* register misc device */ ret = misc_register(&priv->misc_dev); |