aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2009-09-21 20:01:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 10:17:25 -0400
commit83d5cde47dedf01b6a4a4331882cbc0a7eea3c2e (patch)
treef8ba5e263717d35cd444fcc65898d2ed352af1ae /drivers/block
parent7b021967c5e1463936042c8da72b550d3cabe9ac (diff)
const: make block_device_operations const
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/DAC960.c2
-rw-r--r--drivers/block/amiflop.c2
-rw-r--r--drivers/block/aoe/aoeblk.c2
-rw-r--r--drivers/block/ataflop.c2
-rw-r--r--drivers/block/brd.c2
-rw-r--r--drivers/block/cciss.c2
-rw-r--r--drivers/block/cpqarray.c2
-rw-r--r--drivers/block/floppy.c2
-rw-r--r--drivers/block/hd.c2
-rw-r--r--drivers/block/loop.c2
-rw-r--r--drivers/block/mg_disk.c2
-rw-r--r--drivers/block/nbd.c2
-rw-r--r--drivers/block/osdblk.c2
-rw-r--r--drivers/block/paride/pcd.c2
-rw-r--r--drivers/block/paride/pd.c2
-rw-r--r--drivers/block/paride/pf.c2
-rw-r--r--drivers/block/pktcdvd.c2
-rw-r--r--drivers/block/ps3disk.c2
-rw-r--r--drivers/block/ps3vram.c2
-rw-r--r--drivers/block/sunvdc.c2
-rw-r--r--drivers/block/swim.c2
-rw-r--r--drivers/block/swim3.c2
-rw-r--r--drivers/block/sx8.c2
-rw-r--r--drivers/block/ub.c2
-rw-r--r--drivers/block/umem.c3
-rw-r--r--drivers/block/viodasd.c2
-rw-r--r--drivers/block/virtio_blk.c2
-rw-r--r--drivers/block/xd.c2
-rw-r--r--drivers/block/xen-blkfront.c4
-rw-r--r--drivers/block/xsysace.c2
-rw-r--r--drivers/block/z2ram.c3
31 files changed, 32 insertions, 34 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 1e6b7c14f697..8b50af381a8e 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -152,7 +152,7 @@ static int DAC960_revalidate_disk(struct gendisk *disk)
152 return 0; 152 return 0;
153} 153}
154 154
155static struct block_device_operations DAC960_BlockDeviceOperations = { 155static const struct block_device_operations DAC960_BlockDeviceOperations = {
156 .owner = THIS_MODULE, 156 .owner = THIS_MODULE,
157 .open = DAC960_open, 157 .open = DAC960_open,
158 .getgeo = DAC960_getgeo, 158 .getgeo = DAC960_getgeo,
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 2f07b7c99a95..055225839024 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1632,7 +1632,7 @@ static int amiga_floppy_change(struct gendisk *disk)
1632 return 0; 1632 return 0;
1633} 1633}
1634 1634
1635static struct block_device_operations floppy_fops = { 1635static const struct block_device_operations floppy_fops = {
1636 .owner = THIS_MODULE, 1636 .owner = THIS_MODULE,
1637 .open = floppy_open, 1637 .open = floppy_open,
1638 .release = floppy_release, 1638 .release = floppy_release,
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index b6cd571adbf2..3af97d4da2db 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -237,7 +237,7 @@ aoeblk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
237 return 0; 237 return 0;
238} 238}
239 239
240static struct block_device_operations aoe_bdops = { 240static const struct block_device_operations aoe_bdops = {
241 .open = aoeblk_open, 241 .open = aoeblk_open,
242 .release = aoeblk_release, 242 .release = aoeblk_release,
243 .getgeo = aoeblk_getgeo, 243 .getgeo = aoeblk_getgeo,
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index 3ff02941b3dd..847a9e57570a 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -1856,7 +1856,7 @@ static int floppy_release(struct gendisk *disk, fmode_t mode)
1856 return 0; 1856 return 0;
1857} 1857}
1858 1858
1859static struct block_device_operations floppy_fops = { 1859static const struct block_device_operations floppy_fops = {
1860 .owner = THIS_MODULE, 1860 .owner = THIS_MODULE,
1861 .open = floppy_open, 1861 .open = floppy_open,
1862 .release = floppy_release, 1862 .release = floppy_release,
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 4bf8705b3ace..4f688434daf1 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -375,7 +375,7 @@ static int brd_ioctl(struct block_device *bdev, fmode_t mode,
375 return error; 375 return error;
376} 376}
377 377
378static struct block_device_operations brd_fops = { 378static const struct block_device_operations brd_fops = {
379 .owner = THIS_MODULE, 379 .owner = THIS_MODULE,
380 .locked_ioctl = brd_ioctl, 380 .locked_ioctl = brd_ioctl,
381#ifdef CONFIG_BLK_DEV_XIP 381#ifdef CONFIG_BLK_DEV_XIP
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index d8372b432826..4f19105f755c 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -205,7 +205,7 @@ static int cciss_compat_ioctl(struct block_device *, fmode_t,
205 unsigned, unsigned long); 205 unsigned, unsigned long);
206#endif 206#endif
207 207
208static struct block_device_operations cciss_fops = { 208static const struct block_device_operations cciss_fops = {
209 .owner = THIS_MODULE, 209 .owner = THIS_MODULE,
210 .open = cciss_open, 210 .open = cciss_open,
211 .release = cciss_release, 211 .release = cciss_release,
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 44fa2018f6b0..b82d438e2607 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -193,7 +193,7 @@ static inline ctlr_info_t *get_host(struct gendisk *disk)
193} 193}
194 194
195 195
196static struct block_device_operations ida_fops = { 196static const struct block_device_operations ida_fops = {
197 .owner = THIS_MODULE, 197 .owner = THIS_MODULE,
198 .open = ida_open, 198 .open = ida_open,
199 .release = ida_release, 199 .release = ida_release,
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 2b387c2260d8..5c01f747571b 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3907,7 +3907,7 @@ static int floppy_revalidate(struct gendisk *disk)
3907 return res; 3907 return res;
3908} 3908}
3909 3909
3910static struct block_device_operations floppy_fops = { 3910static const struct block_device_operations floppy_fops = {
3911 .owner = THIS_MODULE, 3911 .owner = THIS_MODULE,
3912 .open = floppy_open, 3912 .open = floppy_open,
3913 .release = floppy_release, 3913 .release = floppy_release,
diff --git a/drivers/block/hd.c b/drivers/block/hd.c
index f9d01608cbe2..d5cdce08ffd2 100644
--- a/drivers/block/hd.c
+++ b/drivers/block/hd.c
@@ -692,7 +692,7 @@ static irqreturn_t hd_interrupt(int irq, void *dev_id)
692 return IRQ_HANDLED; 692 return IRQ_HANDLED;
693} 693}
694 694
695static struct block_device_operations hd_fops = { 695static const struct block_device_operations hd_fops = {
696 .getgeo = hd_getgeo, 696 .getgeo = hd_getgeo,
697}; 697};
698 698
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index bbb79441d895..edda9ea7c626 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1438,7 +1438,7 @@ out_unlocked:
1438 return 0; 1438 return 0;
1439} 1439}
1440 1440
1441static struct block_device_operations lo_fops = { 1441static const struct block_device_operations lo_fops = {
1442 .owner = THIS_MODULE, 1442 .owner = THIS_MODULE,
1443 .open = lo_open, 1443 .open = lo_open,
1444 .release = lo_release, 1444 .release = lo_release,
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index 6d7fbaa92248..e0339aaa1815 100644
--- a/drivers/block/mg_disk.c
+++ b/drivers/block/mg_disk.c
@@ -775,7 +775,7 @@ static int mg_getgeo(struct block_device *bdev, struct hd_geometry *geo)
775 return 0; 775 return 0;
776} 776}
777 777
778static struct block_device_operations mg_disk_ops = { 778static const struct block_device_operations mg_disk_ops = {
779 .getgeo = mg_getgeo 779 .getgeo = mg_getgeo
780}; 780};
781 781
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 5d23ffad7c77..cc923a5b430c 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -722,7 +722,7 @@ static int nbd_ioctl(struct block_device *bdev, fmode_t mode,
722 return error; 722 return error;
723} 723}
724 724
725static struct block_device_operations nbd_fops = 725static const struct block_device_operations nbd_fops =
726{ 726{
727 .owner = THIS_MODULE, 727 .owner = THIS_MODULE,
728 .locked_ioctl = nbd_ioctl, 728 .locked_ioctl = nbd_ioctl,
diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c
index 13c1aee6aa3f..a808b1530b3b 100644
--- a/drivers/block/osdblk.c
+++ b/drivers/block/osdblk.c
@@ -125,7 +125,7 @@ static struct class *class_osdblk; /* /sys/class/osdblk */
125static DEFINE_MUTEX(ctl_mutex); /* Serialize open/close/setup/teardown */ 125static DEFINE_MUTEX(ctl_mutex); /* Serialize open/close/setup/teardown */
126static LIST_HEAD(osdblkdev_list); 126static LIST_HEAD(osdblkdev_list);
127 127
128static struct block_device_operations osdblk_bd_ops = { 128static const struct block_device_operations osdblk_bd_ops = {
129 .owner = THIS_MODULE, 129 .owner = THIS_MODULE,
130}; 130};
131 131
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index 9f3518c515a1..8866ca369d5e 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -247,7 +247,7 @@ static int pcd_block_media_changed(struct gendisk *disk)
247 return cdrom_media_changed(&cd->info); 247 return cdrom_media_changed(&cd->info);
248} 248}
249 249
250static struct block_device_operations pcd_bdops = { 250static const struct block_device_operations pcd_bdops = {
251 .owner = THIS_MODULE, 251 .owner = THIS_MODULE,
252 .open = pcd_block_open, 252 .open = pcd_block_open,
253 .release = pcd_block_release, 253 .release = pcd_block_release,
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index bf5955b3d873..569e39e8f114 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -807,7 +807,7 @@ static int pd_revalidate(struct gendisk *p)
807 return 0; 807 return 0;
808} 808}
809 809
810static struct block_device_operations pd_fops = { 810static const struct block_device_operations pd_fops = {
811 .owner = THIS_MODULE, 811 .owner = THIS_MODULE,
812 .open = pd_open, 812 .open = pd_open,
813 .release = pd_release, 813 .release = pd_release,
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c
index 68a90834e993..ea54ea393553 100644
--- a/drivers/block/paride/pf.c
+++ b/drivers/block/paride/pf.c
@@ -262,7 +262,7 @@ static char *pf_buf; /* buffer for request in progress */
262 262
263/* kernel glue structures */ 263/* kernel glue structures */
264 264
265static struct block_device_operations pf_fops = { 265static const struct block_device_operations pf_fops = {
266 .owner = THIS_MODULE, 266 .owner = THIS_MODULE,
267 .open = pf_open, 267 .open = pf_open,
268 .release = pf_release, 268 .release = pf_release,
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index fd5bb8ad59a9..2ddf03ae034e 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2849,7 +2849,7 @@ static int pkt_media_changed(struct gendisk *disk)
2849 return attached_disk->fops->media_changed(attached_disk); 2849 return attached_disk->fops->media_changed(attached_disk);
2850} 2850}
2851 2851
2852static struct block_device_operations pktcdvd_ops = { 2852static const struct block_device_operations pktcdvd_ops = {
2853 .owner = THIS_MODULE, 2853 .owner = THIS_MODULE,
2854 .open = pkt_open, 2854 .open = pkt_open,
2855 .release = pkt_close, 2855 .release = pkt_close,
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index 34cbb7f3efa8..03a130dca8ab 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -82,7 +82,7 @@ enum lv1_ata_in_out {
82static int ps3disk_major; 82static int ps3disk_major;
83 83
84 84
85static struct block_device_operations ps3disk_fops = { 85static const struct block_device_operations ps3disk_fops = {
86 .owner = THIS_MODULE, 86 .owner = THIS_MODULE,
87}; 87};
88 88
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index c8753a9ed290..3bb7c47c869f 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -88,7 +88,7 @@ struct ps3vram_priv {
88static int ps3vram_major; 88static int ps3vram_major;
89 89
90 90
91static struct block_device_operations ps3vram_fops = { 91static const struct block_device_operations ps3vram_fops = {
92 .owner = THIS_MODULE, 92 .owner = THIS_MODULE,
93}; 93};
94 94
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index cbfd9c0aef03..411f064760b4 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -103,7 +103,7 @@ static int vdc_getgeo(struct block_device *bdev, struct hd_geometry *geo)
103 return 0; 103 return 0;
104} 104}
105 105
106static struct block_device_operations vdc_fops = { 106static const struct block_device_operations vdc_fops = {
107 .owner = THIS_MODULE, 107 .owner = THIS_MODULE,
108 .getgeo = vdc_getgeo, 108 .getgeo = vdc_getgeo,
109}; 109};
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index cf7877fb8a7d..8f569e3df890 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -748,7 +748,7 @@ static int floppy_revalidate(struct gendisk *disk)
748 return !fs->disk_in; 748 return !fs->disk_in;
749} 749}
750 750
751static struct block_device_operations floppy_fops = { 751static const struct block_device_operations floppy_fops = {
752 .owner = THIS_MODULE, 752 .owner = THIS_MODULE,
753 .open = floppy_open, 753 .open = floppy_open,
754 .release = floppy_release, 754 .release = floppy_release,
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index 80df93e3cdd0..e39e3820fef9 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -998,7 +998,7 @@ static int floppy_revalidate(struct gendisk *disk)
998 return ret; 998 return ret;
999} 999}
1000 1000
1001static struct block_device_operations floppy_fops = { 1001static const struct block_device_operations floppy_fops = {
1002 .open = floppy_open, 1002 .open = floppy_open,
1003 .release = floppy_release, 1003 .release = floppy_release,
1004 .locked_ioctl = floppy_ioctl, 1004 .locked_ioctl = floppy_ioctl,
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index f5cd2e83ebcc..a7c4184f4a63 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -423,7 +423,7 @@ static struct pci_driver carm_driver = {
423 .remove = carm_remove_one, 423 .remove = carm_remove_one,
424}; 424};
425 425
426static struct block_device_operations carm_bd_ops = { 426static const struct block_device_operations carm_bd_ops = {
427 .owner = THIS_MODULE, 427 .owner = THIS_MODULE,
428 .getgeo = carm_bdev_getgeo, 428 .getgeo = carm_bdev_getgeo,
429}; 429};
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index cc54473b8e77..c739b203fe91 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -1789,7 +1789,7 @@ static int ub_bd_media_changed(struct gendisk *disk)
1789 return lun->changed; 1789 return lun->changed;
1790} 1790}
1791 1791
1792static struct block_device_operations ub_bd_fops = { 1792static const struct block_device_operations ub_bd_fops = {
1793 .owner = THIS_MODULE, 1793 .owner = THIS_MODULE,
1794 .open = ub_bd_open, 1794 .open = ub_bd_open,
1795 .release = ub_bd_release, 1795 .release = ub_bd_release,
diff --git a/drivers/block/umem.c b/drivers/block/umem.c
index 858c34dd032d..ad1ba393801a 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -140,7 +140,6 @@ struct cardinfo {
140}; 140};
141 141
142static struct cardinfo cards[MM_MAXCARDS]; 142static struct cardinfo cards[MM_MAXCARDS];
143static struct block_device_operations mm_fops;
144static struct timer_list battery_timer; 143static struct timer_list battery_timer;
145 144
146static int num_cards; 145static int num_cards;
@@ -789,7 +788,7 @@ static int mm_check_change(struct gendisk *disk)
789 return 0; 788 return 0;
790} 789}
791 790
792static struct block_device_operations mm_fops = { 791static const struct block_device_operations mm_fops = {
793 .owner = THIS_MODULE, 792 .owner = THIS_MODULE,
794 .getgeo = mm_getgeo, 793 .getgeo = mm_getgeo,
795 .revalidate_disk = mm_revalidate, 794 .revalidate_disk = mm_revalidate,
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
index b441ce3832e9..a8c8b56b275e 100644
--- a/drivers/block/viodasd.c
+++ b/drivers/block/viodasd.c
@@ -219,7 +219,7 @@ static int viodasd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
219/* 219/*
220 * Our file operations table 220 * Our file operations table
221 */ 221 */
222static struct block_device_operations viodasd_fops = { 222static const struct block_device_operations viodasd_fops = {
223 .owner = THIS_MODULE, 223 .owner = THIS_MODULE,
224 .open = viodasd_open, 224 .open = viodasd_open,
225 .release = viodasd_release, 225 .release = viodasd_release,
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index aa1a3d5a3e2b..aa89fe45237d 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -243,7 +243,7 @@ static int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo)
243 return 0; 243 return 0;
244} 244}
245 245
246static struct block_device_operations virtblk_fops = { 246static const struct block_device_operations virtblk_fops = {
247 .locked_ioctl = virtblk_ioctl, 247 .locked_ioctl = virtblk_ioctl,
248 .owner = THIS_MODULE, 248 .owner = THIS_MODULE,
249 .getgeo = virtblk_getgeo, 249 .getgeo = virtblk_getgeo,
diff --git a/drivers/block/xd.c b/drivers/block/xd.c
index ce2429219925..0877d3628fda 100644
--- a/drivers/block/xd.c
+++ b/drivers/block/xd.c
@@ -130,7 +130,7 @@ static struct gendisk *xd_gendisk[2];
130 130
131static int xd_getgeo(struct block_device *bdev, struct hd_geometry *geo); 131static int xd_getgeo(struct block_device *bdev, struct hd_geometry *geo);
132 132
133static struct block_device_operations xd_fops = { 133static const struct block_device_operations xd_fops = {
134 .owner = THIS_MODULE, 134 .owner = THIS_MODULE,
135 .locked_ioctl = xd_ioctl, 135 .locked_ioctl = xd_ioctl,
136 .getgeo = xd_getgeo, 136 .getgeo = xd_getgeo,
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index e53284767f7c..b8578bb3f4c9 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -65,7 +65,7 @@ struct blk_shadow {
65 unsigned long frame[BLKIF_MAX_SEGMENTS_PER_REQUEST]; 65 unsigned long frame[BLKIF_MAX_SEGMENTS_PER_REQUEST];
66}; 66};
67 67
68static struct block_device_operations xlvbd_block_fops; 68static const struct block_device_operations xlvbd_block_fops;
69 69
70#define BLK_RING_SIZE __RING_SIZE((struct blkif_sring *)0, PAGE_SIZE) 70#define BLK_RING_SIZE __RING_SIZE((struct blkif_sring *)0, PAGE_SIZE)
71 71
@@ -1039,7 +1039,7 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
1039 return 0; 1039 return 0;
1040} 1040}
1041 1041
1042static struct block_device_operations xlvbd_block_fops = 1042static const struct block_device_operations xlvbd_block_fops =
1043{ 1043{
1044 .owner = THIS_MODULE, 1044 .owner = THIS_MODULE,
1045 .open = blkif_open, 1045 .open = blkif_open,
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index b20abe102a2b..e5c5415eb45e 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -941,7 +941,7 @@ static int ace_getgeo(struct block_device *bdev, struct hd_geometry *geo)
941 return 0; 941 return 0;
942} 942}
943 943
944static struct block_device_operations ace_fops = { 944static const struct block_device_operations ace_fops = {
945 .owner = THIS_MODULE, 945 .owner = THIS_MODULE,
946 .open = ace_open, 946 .open = ace_open,
947 .release = ace_release, 947 .release = ace_release,
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index b2590409f25e..64f941e0f14b 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -64,7 +64,6 @@ static int current_device = -1;
64 64
65static DEFINE_SPINLOCK(z2ram_lock); 65static DEFINE_SPINLOCK(z2ram_lock);
66 66
67static struct block_device_operations z2_fops;
68static struct gendisk *z2ram_gendisk; 67static struct gendisk *z2ram_gendisk;
69 68
70static void do_z2_request(struct request_queue *q) 69static void do_z2_request(struct request_queue *q)
@@ -315,7 +314,7 @@ z2_release(struct gendisk *disk, fmode_t mode)
315 return 0; 314 return 0;
316} 315}
317 316
318static struct block_device_operations z2_fops = 317static const struct block_device_operations z2_fops =
319{ 318{
320 .owner = THIS_MODULE, 319 .owner = THIS_MODULE,
321 .open = z2_open, 320 .open = z2_open,