Skip to content

Commit

Permalink
bsg: mark struct file_operations const
Browse files Browse the repository at this point in the history
struct file_operations is generally const (to avoid false sharing and get compile time errors on accidental writing to this shared structure); bsg recently added one of these without the const keyword. Patch below marks it const....

Signed-off-by: Arjan van de Ven <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
fenrus75 authored and Jens Axboe committed Oct 16, 2007
1 parent 65a6ec0 commit 7344be0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ static long bsg_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}
}

static struct file_operations bsg_fops = {
static const struct file_operations bsg_fops = {
.read = bsg_read,
.write = bsg_write,
.poll = bsg_poll,
Expand Down

0 comments on commit 7344be0

Please sign in to comment.