diff options
| author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-09-21 20:01:13 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:17:25 -0400 |
| commit | 83d5cde47dedf01b6a4a4331882cbc0a7eea3c2e (patch) | |
| tree | f8ba5e263717d35cd444fcc65898d2ed352af1ae | |
| parent | 7b021967c5e1463936042c8da72b550d3cabe9ac (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>
56 files changed, 59 insertions, 61 deletions
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index a4779912a5ca..88f4ae787832 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
| @@ -165,7 +165,7 @@ axon_ram_direct_access(struct block_device *device, sector_t sector, | |||
| 165 | return 0; | 165 | return 0; |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | static struct block_device_operations axon_ram_devops = { | 168 | static const struct block_device_operations axon_ram_devops = { |
| 169 | .owner = THIS_MODULE, | 169 | .owner = THIS_MODULE, |
| 170 | .direct_access = axon_ram_direct_access | 170 | .direct_access = axon_ram_direct_access |
| 171 | }; | 171 | }; |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 8f05d4d9da12..635d16d90a80 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
| @@ -106,7 +106,7 @@ static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo); | |||
| 106 | 106 | ||
| 107 | #define MAX_DEV (16) | 107 | #define MAX_DEV (16) |
| 108 | 108 | ||
| 109 | static struct block_device_operations ubd_blops = { | 109 | static const struct block_device_operations ubd_blops = { |
| 110 | .owner = THIS_MODULE, | 110 | .owner = THIS_MODULE, |
| 111 | .open = ubd_open, | 111 | .open = ubd_open, |
| 112 | .release = ubd_release, | 112 | .release = ubd_release, |
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 | ||
| 155 | static struct block_device_operations DAC960_BlockDeviceOperations = { | 155 | static 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 | ||
| 1635 | static struct block_device_operations floppy_fops = { | 1635 | static 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 | ||
| 240 | static struct block_device_operations aoe_bdops = { | 240 | static 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 | ||
| 1859 | static struct block_device_operations floppy_fops = { | 1859 | static 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 | ||
| 378 | static struct block_device_operations brd_fops = { | 378 | static 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 | ||
| 208 | static struct block_device_operations cciss_fops = { | 208 | static 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 | ||
| 196 | static struct block_device_operations ida_fops = { | 196 | static 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 | ||
| 3910 | static struct block_device_operations floppy_fops = { | 3910 | static 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 | ||
| 695 | static struct block_device_operations hd_fops = { | 695 | static 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 | ||
| 1441 | static struct block_device_operations lo_fops = { | 1441 | static 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 | ||
| 778 | static struct block_device_operations mg_disk_ops = { | 778 | static 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 | ||
| 725 | static struct block_device_operations nbd_fops = | 725 | static 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 */ | |||
| 125 | static DEFINE_MUTEX(ctl_mutex); /* Serialize open/close/setup/teardown */ | 125 | static DEFINE_MUTEX(ctl_mutex); /* Serialize open/close/setup/teardown */ |
| 126 | static LIST_HEAD(osdblkdev_list); | 126 | static LIST_HEAD(osdblkdev_list); |
| 127 | 127 | ||
| 128 | static struct block_device_operations osdblk_bd_ops = { | 128 | static 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 | ||
| 250 | static struct block_device_operations pcd_bdops = { | 250 | static 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 | ||
| 810 | static struct block_device_operations pd_fops = { | 810 | static 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 | ||
| 265 | static struct block_device_operations pf_fops = { | 265 | static 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 | ||
| 2852 | static struct block_device_operations pktcdvd_ops = { | 2852 | static 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 { | |||
| 82 | static int ps3disk_major; | 82 | static int ps3disk_major; |
| 83 | 83 | ||
| 84 | 84 | ||
| 85 | static struct block_device_operations ps3disk_fops = { | 85 | static 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 { | |||
| 88 | static int ps3vram_major; | 88 | static int ps3vram_major; |
| 89 | 89 | ||
| 90 | 90 | ||
| 91 | static struct block_device_operations ps3vram_fops = { | 91 | static 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 | ||
| 106 | static struct block_device_operations vdc_fops = { | 106 | static 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 | ||
| 751 | static struct block_device_operations floppy_fops = { | 751 | static 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 | ||
| 1001 | static struct block_device_operations floppy_fops = { | 1001 | static 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 | ||
| 426 | static struct block_device_operations carm_bd_ops = { | 426 | static 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 | ||
| 1792 | static struct block_device_operations ub_bd_fops = { | 1792 | static 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 | ||
| 142 | static struct cardinfo cards[MM_MAXCARDS]; | 142 | static struct cardinfo cards[MM_MAXCARDS]; |
| 143 | static struct block_device_operations mm_fops; | ||
| 144 | static struct timer_list battery_timer; | 143 | static struct timer_list battery_timer; |
| 145 | 144 | ||
| 146 | static int num_cards; | 145 | static 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 | ||
| 792 | static struct block_device_operations mm_fops = { | 791 | static 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 | */ |
| 222 | static struct block_device_operations viodasd_fops = { | 222 | static 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 | ||
| 246 | static struct block_device_operations virtblk_fops = { | 246 | static 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 | ||
| 131 | static int xd_getgeo(struct block_device *bdev, struct hd_geometry *geo); | 131 | static int xd_getgeo(struct block_device *bdev, struct hd_geometry *geo); |
| 132 | 132 | ||
| 133 | static struct block_device_operations xd_fops = { | 133 | static 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 | ||
| 68 | static struct block_device_operations xlvbd_block_fops; | 68 | static 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 | ||
| 1042 | static struct block_device_operations xlvbd_block_fops = | 1042 | static 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 | ||
| 944 | static struct block_device_operations ace_fops = { | 944 | static 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 | ||
| 65 | static DEFINE_SPINLOCK(z2ram_lock); | 65 | static DEFINE_SPINLOCK(z2ram_lock); |
| 66 | 66 | ||
| 67 | static struct block_device_operations z2_fops; | ||
| 68 | static struct gendisk *z2ram_gendisk; | 67 | static struct gendisk *z2ram_gendisk; |
| 69 | 68 | ||
| 70 | static void do_z2_request(struct request_queue *q) | 69 | static 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 | ||
| 318 | static struct block_device_operations z2_fops = | 317 | static 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, |
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index b5621f27c4be..a762283d2a21 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c | |||
| @@ -512,7 +512,7 @@ static int gdrom_bdops_ioctl(struct block_device *bdev, fmode_t mode, | |||
| 512 | return cdrom_ioctl(gd.cd_info, bdev, mode, cmd, arg); | 512 | return cdrom_ioctl(gd.cd_info, bdev, mode, cmd, arg); |
| 513 | } | 513 | } |
| 514 | 514 | ||
| 515 | static struct block_device_operations gdrom_bdops = { | 515 | static const struct block_device_operations gdrom_bdops = { |
| 516 | .owner = THIS_MODULE, | 516 | .owner = THIS_MODULE, |
| 517 | .open = gdrom_bdops_open, | 517 | .open = gdrom_bdops_open, |
| 518 | .release = gdrom_bdops_release, | 518 | .release = gdrom_bdops_release, |
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 0fff646cc2f0..57ca69e0ac55 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
| @@ -177,7 +177,7 @@ static int viocd_blk_media_changed(struct gendisk *disk) | |||
| 177 | return cdrom_media_changed(&di->viocd_info); | 177 | return cdrom_media_changed(&di->viocd_info); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | struct block_device_operations viocd_fops = { | 180 | static const struct block_device_operations viocd_fops = { |
| 181 | .owner = THIS_MODULE, | 181 | .owner = THIS_MODULE, |
| 182 | .open = viocd_blk_open, | 182 | .open = viocd_blk_open, |
| 183 | .release = viocd_blk_release, | 183 | .release = viocd_blk_release, |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index b79ca419d8d9..64207df8da82 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
| @@ -1686,7 +1686,7 @@ static int idecd_revalidate_disk(struct gendisk *disk) | |||
| 1686 | return 0; | 1686 | return 0; |
| 1687 | } | 1687 | } |
| 1688 | 1688 | ||
| 1689 | static struct block_device_operations idecd_ops = { | 1689 | static const struct block_device_operations idecd_ops = { |
| 1690 | .owner = THIS_MODULE, | 1690 | .owner = THIS_MODULE, |
| 1691 | .open = idecd_open, | 1691 | .open = idecd_open, |
| 1692 | .release = idecd_release, | 1692 | .release = idecd_release, |
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c index 214119026b3f..753241429c26 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c | |||
| @@ -321,7 +321,7 @@ static int ide_gd_ioctl(struct block_device *bdev, fmode_t mode, | |||
| 321 | return drive->disk_ops->ioctl(drive, bdev, mode, cmd, arg); | 321 | return drive->disk_ops->ioctl(drive, bdev, mode, cmd, arg); |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | static struct block_device_operations ide_gd_ops = { | 324 | static const struct block_device_operations ide_gd_ops = { |
| 325 | .owner = THIS_MODULE, | 325 | .owner = THIS_MODULE, |
| 326 | .open = ide_gd_open, | 326 | .open = ide_gd_open, |
| 327 | .release = ide_gd_release, | 327 | .release = ide_gd_release, |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 9d6f62baac27..58fc920d5c32 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
| @@ -1913,7 +1913,7 @@ static int idetape_ioctl(struct block_device *bdev, fmode_t mode, | |||
| 1913 | return err; | 1913 | return err; |
| 1914 | } | 1914 | } |
| 1915 | 1915 | ||
| 1916 | static struct block_device_operations idetape_block_ops = { | 1916 | static const struct block_device_operations idetape_block_ops = { |
| 1917 | .owner = THIS_MODULE, | 1917 | .owner = THIS_MODULE, |
| 1918 | .open = idetape_open, | 1918 | .open = idetape_open, |
| 1919 | .release = idetape_release, | 1919 | .release = idetape_release, |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index eee28fac210c..376f1ab48a24 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
| @@ -1716,7 +1716,7 @@ out: | |||
| 1716 | return r; | 1716 | return r; |
| 1717 | } | 1717 | } |
| 1718 | 1718 | ||
| 1719 | static struct block_device_operations dm_blk_dops; | 1719 | static const struct block_device_operations dm_blk_dops; |
| 1720 | 1720 | ||
| 1721 | static void dm_wq_work(struct work_struct *work); | 1721 | static void dm_wq_work(struct work_struct *work); |
| 1722 | 1722 | ||
| @@ -2663,7 +2663,7 @@ void dm_free_md_mempools(struct dm_md_mempools *pools) | |||
| 2663 | kfree(pools); | 2663 | kfree(pools); |
| 2664 | } | 2664 | } |
| 2665 | 2665 | ||
| 2666 | static struct block_device_operations dm_blk_dops = { | 2666 | static const struct block_device_operations dm_blk_dops = { |
| 2667 | .open = dm_blk_open, | 2667 | .open = dm_blk_open, |
| 2668 | .release = dm_blk_close, | 2668 | .release = dm_blk_close, |
| 2669 | .ioctl = dm_blk_ioctl, | 2669 | .ioctl = dm_blk_ioctl, |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 9dd872000cec..6aa497e4baf8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
| @@ -138,7 +138,7 @@ static ctl_table raid_root_table[] = { | |||
| 138 | { .ctl_name = 0 } | 138 | { .ctl_name = 0 } |
| 139 | }; | 139 | }; |
| 140 | 140 | ||
| 141 | static struct block_device_operations md_fops; | 141 | static const struct block_device_operations md_fops; |
| 142 | 142 | ||
| 143 | static int start_readonly; | 143 | static int start_readonly; |
| 144 | 144 | ||
| @@ -5556,7 +5556,7 @@ static int md_revalidate(struct gendisk *disk) | |||
| 5556 | mddev->changed = 0; | 5556 | mddev->changed = 0; |
| 5557 | return 0; | 5557 | return 0; |
| 5558 | } | 5558 | } |
| 5559 | static struct block_device_operations md_fops = | 5559 | static const struct block_device_operations md_fops = |
| 5560 | { | 5560 | { |
| 5561 | .owner = THIS_MODULE, | 5561 | .owner = THIS_MODULE, |
| 5562 | .open = md_open, | 5562 | .open = md_open, |
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c index 7847bbc1440d..bd83fa0a4970 100644 --- a/drivers/memstick/core/mspro_block.c +++ b/drivers/memstick/core/mspro_block.c | |||
| @@ -235,7 +235,7 @@ static int mspro_block_bd_getgeo(struct block_device *bdev, | |||
| 235 | return 0; | 235 | return 0; |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | static struct block_device_operations ms_block_bdops = { | 238 | static const struct block_device_operations ms_block_bdops = { |
| 239 | .open = mspro_block_bd_open, | 239 | .open = mspro_block_bd_open, |
| 240 | .release = mspro_block_bd_release, | 240 | .release = mspro_block_bd_release, |
| 241 | .getgeo = mspro_block_bd_getgeo, | 241 | .getgeo = mspro_block_bd_getgeo, |
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index 335d4c78a775..d505b68cd372 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c | |||
| @@ -925,7 +925,7 @@ static void i2o_block_request_fn(struct request_queue *q) | |||
| 925 | }; | 925 | }; |
| 926 | 926 | ||
| 927 | /* I2O Block device operations definition */ | 927 | /* I2O Block device operations definition */ |
| 928 | static struct block_device_operations i2o_block_fops = { | 928 | static const struct block_device_operations i2o_block_fops = { |
| 929 | .owner = THIS_MODULE, | 929 | .owner = THIS_MODULE, |
| 930 | .open = i2o_block_open, | 930 | .open = i2o_block_open, |
| 931 | .release = i2o_block_release, | 931 | .release = i2o_block_release, |
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index adc205c49fbf..85f0e8cd875b 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
| @@ -130,7 +130,7 @@ mmc_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
| 130 | return 0; | 130 | return 0; |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | static struct block_device_operations mmc_bdops = { | 133 | static const struct block_device_operations mmc_bdops = { |
| 134 | .open = mmc_blk_open, | 134 | .open = mmc_blk_open, |
| 135 | .release = mmc_blk_release, | 135 | .release = mmc_blk_release, |
| 136 | .getgeo = mmc_blk_getgeo, | 136 | .getgeo = mmc_blk_getgeo, |
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index 7baba40c1ed2..0acbf4f5be50 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c | |||
| @@ -210,7 +210,7 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode, | |||
| 210 | } | 210 | } |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | static struct block_device_operations mtd_blktrans_ops = { | 213 | static const struct block_device_operations mtd_blktrans_ops = { |
| 214 | .owner = THIS_MODULE, | 214 | .owner = THIS_MODULE, |
| 215 | .open = blktrans_open, | 215 | .open = blktrans_open, |
| 216 | .release = blktrans_release, | 216 | .release = blktrans_release, |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index e109da4583a8..dad0449475b6 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
| @@ -2146,7 +2146,7 @@ static int dasd_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
| 2146 | return 0; | 2146 | return 0; |
| 2147 | } | 2147 | } |
| 2148 | 2148 | ||
| 2149 | struct block_device_operations | 2149 | const struct block_device_operations |
| 2150 | dasd_device_operations = { | 2150 | dasd_device_operations = { |
| 2151 | .owner = THIS_MODULE, | 2151 | .owner = THIS_MODULE, |
| 2152 | .open = dasd_open, | 2152 | .open = dasd_open, |
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 5e47a1ee52b9..8afd9fa00875 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
| @@ -540,7 +540,7 @@ dasd_check_blocksize(int bsize) | |||
| 540 | extern debug_info_t *dasd_debug_area; | 540 | extern debug_info_t *dasd_debug_area; |
| 541 | extern struct dasd_profile_info_t dasd_global_profile; | 541 | extern struct dasd_profile_info_t dasd_global_profile; |
| 542 | extern unsigned int dasd_profile_level; | 542 | extern unsigned int dasd_profile_level; |
| 543 | extern struct block_device_operations dasd_device_operations; | 543 | extern const struct block_device_operations dasd_device_operations; |
| 544 | 544 | ||
| 545 | extern struct kmem_cache *dasd_page_cache; | 545 | extern struct kmem_cache *dasd_page_cache; |
| 546 | 546 | ||
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index d34617682a62..f76f4bd82b9f 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
| @@ -34,7 +34,7 @@ static int dcssblk_direct_access(struct block_device *bdev, sector_t secnum, | |||
| 34 | static char dcssblk_segments[DCSSBLK_PARM_LEN] = "\0"; | 34 | static char dcssblk_segments[DCSSBLK_PARM_LEN] = "\0"; |
| 35 | 35 | ||
| 36 | static int dcssblk_major; | 36 | static int dcssblk_major; |
| 37 | static struct block_device_operations dcssblk_devops = { | 37 | static const struct block_device_operations dcssblk_devops = { |
| 38 | .owner = THIS_MODULE, | 38 | .owner = THIS_MODULE, |
| 39 | .open = dcssblk_open, | 39 | .open = dcssblk_open, |
| 40 | .release = dcssblk_release, | 40 | .release = dcssblk_release, |
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c index ee604e92a5fa..116d1b3eeb15 100644 --- a/drivers/s390/block/xpram.c +++ b/drivers/s390/block/xpram.c | |||
| @@ -244,7 +244,7 @@ static int xpram_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
| 244 | return 0; | 244 | return 0; |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | static struct block_device_operations xpram_devops = | 247 | static const struct block_device_operations xpram_devops = |
| 248 | { | 248 | { |
| 249 | .owner = THIS_MODULE, | 249 | .owner = THIS_MODULE, |
| 250 | .getgeo = xpram_getgeo, | 250 | .getgeo = xpram_getgeo, |
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 4cb9e70507ab..64f57ef2763c 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
| @@ -50,7 +50,7 @@ static int tapeblock_ioctl(struct block_device *, fmode_t, unsigned int, | |||
| 50 | static int tapeblock_medium_changed(struct gendisk *); | 50 | static int tapeblock_medium_changed(struct gendisk *); |
| 51 | static int tapeblock_revalidate_disk(struct gendisk *); | 51 | static int tapeblock_revalidate_disk(struct gendisk *); |
| 52 | 52 | ||
| 53 | static struct block_device_operations tapeblock_fops = { | 53 | static const struct block_device_operations tapeblock_fops = { |
| 54 | .owner = THIS_MODULE, | 54 | .owner = THIS_MODULE, |
| 55 | .open = tapeblock_open, | 55 | .open = tapeblock_open, |
| 56 | .release = tapeblock_release, | 56 | .release = tapeblock_release, |
diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c index 6d4651684688..869a30b49edc 100644 --- a/drivers/sbus/char/jsflash.c +++ b/drivers/sbus/char/jsflash.c | |||
| @@ -452,7 +452,7 @@ static const struct file_operations jsf_fops = { | |||
| 452 | 452 | ||
| 453 | static struct miscdevice jsf_dev = { JSF_MINOR, "jsflash", &jsf_fops }; | 453 | static struct miscdevice jsf_dev = { JSF_MINOR, "jsflash", &jsf_fops }; |
| 454 | 454 | ||
| 455 | static struct block_device_operations jsfd_fops = { | 455 | static const struct block_device_operations jsfd_fops = { |
| 456 | .owner = THIS_MODULE, | 456 | .owner = THIS_MODULE, |
| 457 | }; | 457 | }; |
| 458 | 458 | ||
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index a89c421dab51..8dd96dcd716c 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
| @@ -956,7 +956,7 @@ static int sd_compat_ioctl(struct block_device *bdev, fmode_t mode, | |||
| 956 | } | 956 | } |
| 957 | #endif | 957 | #endif |
| 958 | 958 | ||
| 959 | static struct block_device_operations sd_fops = { | 959 | static const struct block_device_operations sd_fops = { |
| 960 | .owner = THIS_MODULE, | 960 | .owner = THIS_MODULE, |
| 961 | .open = sd_open, | 961 | .open = sd_open, |
| 962 | .release = sd_release, | 962 | .release = sd_release, |
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index cce0fe4c8a3b..eb61f7a70e1d 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
| @@ -525,7 +525,7 @@ static int sr_block_media_changed(struct gendisk *disk) | |||
| 525 | return cdrom_media_changed(&cd->cdi); | 525 | return cdrom_media_changed(&cd->cdi); |
| 526 | } | 526 | } |
| 527 | 527 | ||
| 528 | static struct block_device_operations sr_bdops = | 528 | static const struct block_device_operations sr_bdops = |
| 529 | { | 529 | { |
| 530 | .owner = THIS_MODULE, | 530 | .owner = THIS_MODULE, |
| 531 | .open = sr_block_open, | 531 | .open = sr_block_open, |
diff --git a/fs/block_dev.c b/fs/block_dev.c index 71e7e03ac343..5d1ed50bd46c 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
| @@ -1114,7 +1114,7 @@ EXPORT_SYMBOL(revalidate_disk); | |||
| 1114 | int check_disk_change(struct block_device *bdev) | 1114 | int check_disk_change(struct block_device *bdev) |
| 1115 | { | 1115 | { |
| 1116 | struct gendisk *disk = bdev->bd_disk; | 1116 | struct gendisk *disk = bdev->bd_disk; |
| 1117 | struct block_device_operations * bdops = disk->fops; | 1117 | const struct block_device_operations *bdops = disk->fops; |
| 1118 | 1118 | ||
| 1119 | if (!bdops->media_changed) | 1119 | if (!bdops->media_changed) |
| 1120 | return 0; | 1120 | return 0; |
diff --git a/fs/ext2/xip.c b/fs/ext2/xip.c index b72b85884223..c18fbf3e4068 100644 --- a/fs/ext2/xip.c +++ b/fs/ext2/xip.c | |||
| @@ -20,7 +20,7 @@ __inode_direct_access(struct inode *inode, sector_t block, | |||
| 20 | void **kaddr, unsigned long *pfn) | 20 | void **kaddr, unsigned long *pfn) |
| 21 | { | 21 | { |
| 22 | struct block_device *bdev = inode->i_sb->s_bdev; | 22 | struct block_device *bdev = inode->i_sb->s_bdev; |
| 23 | struct block_device_operations *ops = bdev->bd_disk->fops; | 23 | const struct block_device_operations *ops = bdev->bd_disk->fops; |
| 24 | sector_t sector; | 24 | sector_t sector; |
| 25 | 25 | ||
| 26 | sector = block * (PAGE_SIZE / 512); /* ext2 block to bdev sector */ | 26 | sector = block * (PAGE_SIZE / 512); /* ext2 block to bdev sector */ |
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index fbeaddf595d3..7b685e10cbad 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
| @@ -581,7 +581,7 @@ try_scan: | |||
| 581 | } | 581 | } |
| 582 | 582 | ||
| 583 | if (from + size > get_capacity(disk)) { | 583 | if (from + size > get_capacity(disk)) { |
| 584 | struct block_device_operations *bdops = disk->fops; | 584 | const struct block_device_operations *bdops = disk->fops; |
| 585 | unsigned long long capacity; | 585 | unsigned long long capacity; |
| 586 | 586 | ||
| 587 | printk(KERN_WARNING | 587 | printk(KERN_WARNING |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 109d179adb93..297df45ffd0a 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -151,7 +151,7 @@ struct gendisk { | |||
| 151 | struct disk_part_tbl *part_tbl; | 151 | struct disk_part_tbl *part_tbl; |
| 152 | struct hd_struct part0; | 152 | struct hd_struct part0; |
| 153 | 153 | ||
| 154 | struct block_device_operations *fops; | 154 | const struct block_device_operations *fops; |
| 155 | struct request_queue *queue; | 155 | struct request_queue *queue; |
| 156 | void *private_data; | 156 | void *private_data; |
| 157 | 157 | ||
