summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-09 15:48:43 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-10 18:24:03 +0100
commitbe7e8b917ead54754cc14b6c03769c8738a3f3f3 (patch)
tree53bd904ed0ebafd92019506c549fd88144f3f934 /include
parentdriver core: class: make namespace and get_ownership take const * (diff)
downloadlinux-be7e8b917ead54754cc14b6c03769c8738a3f3f3.tar.xz
linux-be7e8b917ead54754cc14b6c03769c8738a3f3f3.zip
blkdev: make struct block_device_operations.devnode() take a const *
The devnode() callback in struct block_device_operations should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into the one subsystem that actually uses this callback. Acked-by: Jens Axboe <axboe@kernel.dk> Link: https://lore.kernel.org/r/20221109144843.679668-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 50e358a19d98..2a455793462b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1413,7 +1413,7 @@ struct block_device_operations {
void (*swap_slot_free_notify) (struct block_device *, unsigned long);
int (*report_zones)(struct gendisk *, sector_t sector,
unsigned int nr_zones, report_zones_cb cb, void *data);
- char *(*devnode)(struct gendisk *disk, umode_t *mode);
+ char *(*devnode)(const struct gendisk *disk, umode_t *mode);
/* returns the length of the identifier or a negative errno: */
int (*get_unique_id)(struct gendisk *disk, u8 id[16],
enum blk_unique_id id_type);