Skip to content

Commit 83d5cde

Browse files
Alexey Dobriyantorvalds
authored andcommitted
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>
1 parent 7b02196 commit 83d5cde

56 files changed

Lines changed: 59 additions & 61 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/powerpc/sysdev/axonram.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ axon_ram_direct_access(struct block_device *device, sector_t sector,
165165
return 0;
166166
}
167167

168-
static struct block_device_operations axon_ram_devops = {
168+
static const struct block_device_operations axon_ram_devops = {
169169
.owner = THIS_MODULE,
170170
.direct_access = axon_ram_direct_access
171171
};

‎arch/um/drivers/ubd_kern.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo);
106106

107107
#define MAX_DEV (16)
108108

109-
static struct block_device_operations ubd_blops = {
109+
static const struct block_device_operations ubd_blops = {
110110
.owner = THIS_MODULE,
111111
.open = ubd_open,
112112
.release = ubd_release,

‎drivers/block/DAC960.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static int DAC960_revalidate_disk(struct gendisk *disk)
152152
return 0;
153153
}
154154

155-
static struct block_device_operations DAC960_BlockDeviceOperations = {
155+
static const struct block_device_operations DAC960_BlockDeviceOperations = {
156156
.owner = THIS_MODULE,
157157
.open = DAC960_open,
158158
.getgeo = DAC960_getgeo,

‎drivers/block/amiflop.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,7 @@ static int amiga_floppy_change(struct gendisk *disk)
16321632
return 0;
16331633
}
16341634

1635-
static struct block_device_operations floppy_fops = {
1635+
static const struct block_device_operations floppy_fops = {
16361636
.owner = THIS_MODULE,
16371637
.open = floppy_open,
16381638
.release = floppy_release,

‎drivers/block/aoe/aoeblk.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ aoeblk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
237237
return 0;
238238
}
239239

240-
static struct block_device_operations aoe_bdops = {
240+
static const struct block_device_operations aoe_bdops = {
241241
.open = aoeblk_open,
242242
.release = aoeblk_release,
243243
.getgeo = aoeblk_getgeo,

‎drivers/block/ataflop.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,7 @@ static int floppy_release(struct gendisk *disk, fmode_t mode)
18561856
return 0;
18571857
}
18581858

1859-
static struct block_device_operations floppy_fops = {
1859+
static const struct block_device_operations floppy_fops = {
18601860
.owner = THIS_MODULE,
18611861
.open = floppy_open,
18621862
.release = floppy_release,

‎drivers/block/brd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ static int brd_ioctl(struct block_device *bdev, fmode_t mode,
375375
return error;
376376
}
377377

378-
static struct block_device_operations brd_fops = {
378+
static const struct block_device_operations brd_fops = {
379379
.owner = THIS_MODULE,
380380
.locked_ioctl = brd_ioctl,
381381
#ifdef CONFIG_BLK_DEV_XIP

‎drivers/block/cciss.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static int cciss_compat_ioctl(struct block_device *, fmode_t,
205205
unsigned, unsigned long);
206206
#endif
207207

208-
static struct block_device_operations cciss_fops = {
208+
static const struct block_device_operations cciss_fops = {
209209
.owner = THIS_MODULE,
210210
.open = cciss_open,
211211
.release = cciss_release,

‎drivers/block/cpqarray.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static inline ctlr_info_t *get_host(struct gendisk *disk)
193193
}
194194

195195

196-
static struct block_device_operations ida_fops = {
196+
static const struct block_device_operations ida_fops = {
197197
.owner = THIS_MODULE,
198198
.open = ida_open,
199199
.release = ida_release,

‎drivers/block/floppy.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3907,7 +3907,7 @@ static int floppy_revalidate(struct gendisk *disk)
39073907
return res;
39083908
}
39093909

3910-
static struct block_device_operations floppy_fops = {
3910+
static const struct block_device_operations floppy_fops = {
39113911
.owner = THIS_MODULE,
39123912
.open = floppy_open,
39133913
.release = floppy_release,

0 commit comments

Comments
 (0)