summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/block.c2
-rw-r--r--include/block.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/common/block.c b/common/block.c
index 19bb81df2c..6290a45b7c 100644
--- a/common/block.c
+++ b/common/block.c
@@ -361,7 +361,7 @@ static struct cdev_operations block_ops = {
.discard_range = block_op_discard_range,
};
-struct block_device *cdev_get_block_device(struct cdev *cdev)
+struct block_device *cdev_get_block_device(const struct cdev *cdev)
{
if (!cdev || cdev->ops != &block_ops)
return NULL;
diff --git a/include/block.h b/include/block.h
index 1fb40e942f..8740a03d36 100644
--- a/include/block.h
+++ b/include/block.h
@@ -50,9 +50,9 @@ static inline int block_flush(struct block_device *blk)
}
#ifdef CONFIG_BLOCK
-struct block_device *cdev_get_block_device(struct cdev *cdev);
+struct block_device *cdev_get_block_device(const struct cdev *cdev);
#else
-static inline struct block_device *cdev_get_block_device(struct cdev *cdev)
+static inline struct block_device *cdev_get_block_device(const struct cdev *cdev)
{
return NULL;
}