Commit 784e29d2 authored by Jan Engelhardt's avatar Jan Engelhardt Committed by Mauro Carvalho Chehab

V4L/DVB (10391): dvb: constify VFTs

dvb: constify VFTs
Signed-off-by: default avatarJan Engelhardt <jengelh@medozas.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c675e79c
...@@ -682,7 +682,7 @@ static ssize_t dst_ca_write(struct file *file, const char __user *buffer, size_t ...@@ -682,7 +682,7 @@ static ssize_t dst_ca_write(struct file *file, const char __user *buffer, size_t
return 0; return 0;
} }
static struct file_operations dst_ca_fops = { static const struct file_operations dst_ca_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.ioctl = dst_ca_ioctl, .ioctl = dst_ca_ioctl,
.open = dst_ca_open, .open = dst_ca_open,
......
...@@ -1024,7 +1024,7 @@ static int dvb_demux_release(struct inode *inode, struct file *file) ...@@ -1024,7 +1024,7 @@ static int dvb_demux_release(struct inode *inode, struct file *file)
return ret; return ret;
} }
static struct file_operations dvb_demux_fops = { static const struct file_operations dvb_demux_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = dvb_demux_read, .read = dvb_demux_read,
.ioctl = dvb_demux_ioctl, .ioctl = dvb_demux_ioctl,
......
...@@ -1607,7 +1607,7 @@ static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table * wait) ...@@ -1607,7 +1607,7 @@ static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table * wait)
EXPORT_SYMBOL(dvb_ca_en50221_init); EXPORT_SYMBOL(dvb_ca_en50221_init);
static struct file_operations dvb_ca_fops = { static const struct file_operations dvb_ca_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = dvb_ca_en50221_io_read, .read = dvb_ca_en50221_io_read,
.write = dvb_ca_en50221_io_write, .write = dvb_ca_en50221_io_write,
......
...@@ -1875,7 +1875,7 @@ static int dvb_frontend_release(struct inode *inode, struct file *file) ...@@ -1875,7 +1875,7 @@ static int dvb_frontend_release(struct inode *inode, struct file *file)
return ret; return ret;
} }
static struct file_operations dvb_frontend_fops = { static const struct file_operations dvb_frontend_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.ioctl = dvb_generic_ioctl, .ioctl = dvb_generic_ioctl,
.poll = dvb_frontend_poll, .poll = dvb_frontend_poll,
......
...@@ -1459,7 +1459,7 @@ static int dvb_net_close(struct inode *inode, struct file *file) ...@@ -1459,7 +1459,7 @@ static int dvb_net_close(struct inode *inode, struct file *file)
} }
static struct file_operations dvb_net_fops = { static const struct file_operations dvb_net_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.ioctl = dvb_net_ioctl, .ioctl = dvb_net_ioctl,
.open = dvb_generic_open, .open = dvb_generic_open,
......
...@@ -228,8 +228,8 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, ...@@ -228,8 +228,8 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
dvbdev->fops = dvbdevfops; dvbdev->fops = dvbdevfops;
init_waitqueue_head (&dvbdev->wait_queue); init_waitqueue_head (&dvbdev->wait_queue);
memcpy(dvbdev->fops, template->fops, sizeof(struct file_operations)); memcpy(dvbdevfops, template->fops, sizeof(struct file_operations));
dvbdev->fops->owner = adap->module; dvbdevfops->owner = adap->module;
list_add_tail (&dvbdev->list_head, &adap->device_list); list_add_tail (&dvbdev->list_head, &adap->device_list);
......
...@@ -71,7 +71,7 @@ struct dvb_adapter { ...@@ -71,7 +71,7 @@ struct dvb_adapter {
struct dvb_device { struct dvb_device {
struct list_head list_head; struct list_head list_head;
struct file_operations *fops; const struct file_operations *fops;
struct dvb_adapter *adapter; struct dvb_adapter *adapter;
int type; int type;
int minor; int minor;
......
...@@ -725,7 +725,7 @@ static int dvb_osd_ioctl(struct inode *inode, struct file *file, ...@@ -725,7 +725,7 @@ static int dvb_osd_ioctl(struct inode *inode, struct file *file,
} }
static struct file_operations dvb_osd_fops = { static const struct file_operations dvb_osd_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.ioctl = dvb_generic_ioctl, .ioctl = dvb_generic_ioctl,
.open = dvb_generic_open, .open = dvb_generic_open,
......
...@@ -1456,7 +1456,7 @@ static int dvb_audio_release(struct inode *inode, struct file *file) ...@@ -1456,7 +1456,7 @@ static int dvb_audio_release(struct inode *inode, struct file *file)
* driver registration * driver registration
******************************************************************************/ ******************************************************************************/
static struct file_operations dvb_video_fops = { static const struct file_operations dvb_video_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.write = dvb_video_write, .write = dvb_video_write,
.ioctl = dvb_generic_ioctl, .ioctl = dvb_generic_ioctl,
...@@ -1474,7 +1474,7 @@ static struct dvb_device dvbdev_video = { ...@@ -1474,7 +1474,7 @@ static struct dvb_device dvbdev_video = {
.kernel_ioctl = dvb_video_ioctl, .kernel_ioctl = dvb_video_ioctl,
}; };
static struct file_operations dvb_audio_fops = { static const struct file_operations dvb_audio_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.write = dvb_audio_write, .write = dvb_audio_write,
.ioctl = dvb_generic_ioctl, .ioctl = dvb_generic_ioctl,
......
...@@ -345,7 +345,7 @@ static ssize_t dvb_ca_read(struct file *file, char __user *buf, ...@@ -345,7 +345,7 @@ static ssize_t dvb_ca_read(struct file *file, char __user *buf,
return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos); return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos);
} }
static struct file_operations dvb_ca_fops = { static const struct file_operations dvb_ca_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = dvb_ca_read, .read = dvb_ca_read,
.write = dvb_ca_write, .write = dvb_ca_write,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment