V4L/DVB (10391): dvb: constify VFTs
authorJan Engelhardt <jengelh@medozas.de>
Sun, 11 Jan 2009 09:12:43 +0000 (06:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:42:34 +0000 (12:42 -0300)
dvb: constify VFTs

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/bt8xx/dst_ca.c
drivers/media/dvb/dvb-core/dmxdev.c
drivers/media/dvb/dvb-core/dvb_ca_en50221.c
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/media/dvb/dvb-core/dvb_net.c
drivers/media/dvb/dvb-core/dvbdev.c
drivers/media/dvb/dvb-core/dvbdev.h
drivers/media/dvb/ttpci/av7110.c
drivers/media/dvb/ttpci/av7110_av.c
drivers/media/dvb/ttpci/av7110_ca.c

index 0258451423ad876b53e3e2a9b94044cf1b7025c9..6c68f02c170944751060b2bc14182df4547626bb 100644 (file)
@@ -682,7 +682,7 @@ static ssize_t dst_ca_write(struct file *file, const char __user *buffer, size_t
        return 0;
 }
 
-static struct file_operations dst_ca_fops = {
+static const struct file_operations dst_ca_fops = {
        .owner = THIS_MODULE,
        .ioctl = dst_ca_ioctl,
        .open = dst_ca_open,
index 069d847ba887c39e2f1f83eafdf7c06a07b838a7..c35fbb8d8f4a1b5c8c07cda277ad23f76cb558ab 100644 (file)
@@ -1024,7 +1024,7 @@ static int dvb_demux_release(struct inode *inode, struct file *file)
        return ret;
 }
 
-static struct file_operations dvb_demux_fops = {
+static const struct file_operations dvb_demux_fops = {
        .owner = THIS_MODULE,
        .read = dvb_demux_read,
        .ioctl = dvb_demux_ioctl,
index 7e3aeaa7370f3a6ed3bf45700694e1c6fddae322..cb22da53bfb0fb126a7760a58b95339b0ae76a5a 100644 (file)
@@ -1607,7 +1607,7 @@ static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table * wait)
 EXPORT_SYMBOL(dvb_ca_en50221_init);
 
 
-static struct file_operations dvb_ca_fops = {
+static const struct file_operations dvb_ca_fops = {
        .owner = THIS_MODULE,
        .read = dvb_ca_en50221_io_read,
        .write = dvb_ca_en50221_io_write,
index 8dcb3fbf7acd9df47e9dc45e04d33b185e6b3a9d..ebc78157b9b8ced38cf637b9c336a0009f868836 100644 (file)
@@ -1875,7 +1875,7 @@ static int dvb_frontend_release(struct inode *inode, struct file *file)
        return ret;
 }
 
-static struct file_operations dvb_frontend_fops = {
+static const struct file_operations dvb_frontend_fops = {
        .owner          = THIS_MODULE,
        .ioctl          = dvb_generic_ioctl,
        .poll           = dvb_frontend_poll,
index f6ba8468858ef34a8f1bbf99e18fab7c6b10df20..8280f8d66a3823264ee8842c106074580b81946b 100644 (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,
        .ioctl = dvb_net_ioctl,
        .open = dvb_generic_open,
index 6a32680dbb1b07575f546d75d3132747a34f503f..a454ee8f1e438939ecfd584d7fa90cdd2ec9c7b1 100644 (file)
@@ -228,8 +228,8 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
        dvbdev->fops = dvbdevfops;
        init_waitqueue_head (&dvbdev->wait_queue);
 
-       memcpy(dvbdev->fops, template->fops, sizeof(struct file_operations));
-       dvbdev->fops->owner = adap->module;
+       memcpy(dvbdevfops, template->fops, sizeof(struct file_operations));
+       dvbdevfops->owner = adap->module;
 
        list_add_tail (&dvbdev->list_head, &adap->device_list);
 
index dca49cf962e864c37cefad089669187735f8c524..79927305e84d42e63030e720a43c617c7f493b04 100644 (file)
@@ -71,7 +71,7 @@ struct dvb_adapter {
 
 struct dvb_device {
        struct list_head list_head;
-       struct file_operations *fops;
+       const struct file_operations *fops;
        struct dvb_adapter *adapter;
        int type;
        int minor;
index aa1ff524256e1397012bcde72919d94113df6f18..4624cee93e749cc6a5c11461ba2a8028f26c281f 100644 (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,
        .ioctl          = dvb_generic_ioctl,
        .open           = dvb_generic_open,
index bdc62acf2099ea431f5303f1336d6e2a78902bba..e4d0900d5121f0bfa6d343e7ac29de1fb906e542 100644 (file)
@@ -1456,7 +1456,7 @@ static int dvb_audio_release(struct inode *inode, struct file *file)
  * driver registration
  ******************************************************************************/
 
-static struct file_operations dvb_video_fops = {
+static const struct file_operations dvb_video_fops = {
        .owner          = THIS_MODULE,
        .write          = dvb_video_write,
        .ioctl          = dvb_generic_ioctl,
@@ -1474,7 +1474,7 @@ static struct dvb_device dvbdev_video = {
        .kernel_ioctl   = dvb_video_ioctl,
 };
 
-static struct file_operations dvb_audio_fops = {
+static const struct file_operations dvb_audio_fops = {
        .owner          = THIS_MODULE,
        .write          = dvb_audio_write,
        .ioctl          = dvb_generic_ioctl,
index 261135ded4815ecf909875773ddf19c9ceb50836..c7a65b1544a330e34a2e500883981336ba23c6c4 100644 (file)
@@ -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);
 }
 
-static struct file_operations dvb_ca_fops = {
+static const struct file_operations dvb_ca_fops = {
        .owner          = THIS_MODULE,
        .read           = dvb_ca_read,
        .write          = dvb_ca_write,