summaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2017-06-20 14:15:48 -0400
committerJens Axboe <axboe@kernel.dk>2017-06-20 21:27:14 -0400
commitedf8ff558887364714e115d396b2d06949cf1e07 (patch)
tree3417111969738e0d9ac39dd78ea97949d817721d /block/genhd.c
parent7b6078146ccbe9bd165d578586b10ea092ac489e (diff)
block: Constify disk_type
The variable 'disk_type' is never modified so constify it. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.com> Cc: Omar Sandoval <osandov@fb.com> Cc: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c
index d252d29fe837..7f520fa25d16 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -36,7 +36,7 @@ struct kobject *block_depr;
36static DEFINE_SPINLOCK(ext_devt_lock); 36static DEFINE_SPINLOCK(ext_devt_lock);
37static DEFINE_IDR(ext_devt_idr); 37static DEFINE_IDR(ext_devt_idr);
38 38
39static struct device_type disk_type; 39static const struct device_type disk_type;
40 40
41static void disk_check_events(struct disk_events *ev, 41static void disk_check_events(struct disk_events *ev,
42 unsigned int *clearing_ptr); 42 unsigned int *clearing_ptr);
@@ -1183,7 +1183,7 @@ static char *block_devnode(struct device *dev, umode_t *mode,
1183 return NULL; 1183 return NULL;
1184} 1184}
1185 1185
1186static struct device_type disk_type = { 1186static const struct device_type disk_type = {
1187 .name = "disk", 1187 .name = "disk",
1188 .groups = disk_attr_groups, 1188 .groups = disk_attr_groups,
1189 .release = disk_release, 1189 .release = disk_release,