提交 edf8ff55 编写于 作者: B Bart Van Assche 提交者: Jens Axboe

block: Constify disk_type

The variable 'disk_type' is never modified so constify it.
Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: NChristoph 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: NJens Axboe <axboe@kernel.dk>
上级 7b607814
...@@ -36,7 +36,7 @@ struct kobject *block_depr; ...@@ -36,7 +36,7 @@ struct kobject *block_depr;
static DEFINE_SPINLOCK(ext_devt_lock); static DEFINE_SPINLOCK(ext_devt_lock);
static DEFINE_IDR(ext_devt_idr); static DEFINE_IDR(ext_devt_idr);
static struct device_type disk_type; static const struct device_type disk_type;
static void disk_check_events(struct disk_events *ev, static void disk_check_events(struct disk_events *ev,
unsigned int *clearing_ptr); unsigned int *clearing_ptr);
...@@ -1183,7 +1183,7 @@ static char *block_devnode(struct device *dev, umode_t *mode, ...@@ -1183,7 +1183,7 @@ static char *block_devnode(struct device *dev, umode_t *mode,
return NULL; return NULL;
} }
static struct device_type disk_type = { static const struct device_type disk_type = {
.name = "disk", .name = "disk",
.groups = disk_attr_groups, .groups = disk_attr_groups,
.release = disk_release, .release = disk_release,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册