There really isn't any good reason to stash a method directly into struct gendisk. Move it together with the other block device operations.
Showing the changes to include/linux/blkdev.h (1 of 4 files). Show all
Unified · Split
| @@ -1697,6 +1697,7 @@ struct block_device_operations { · 1696 unmodified lines | |||
| 1697 | void (*swap_slot_free_notify) (struct block_device *, unsigned long); | 1697 | void (*swap_slot_free_notify) (struct block_device *, unsigned long); |
| 1698 | int (*report_zones)(struct gendisk *, sector_t sector, | 1698 | int (*report_zones)(struct gendisk *, sector_t sector, |
| 1699 | unsigned int nr_zones, report_zones_cb cb, void *data); | 1699 | unsigned int nr_zones, report_zones_cb cb, void *data); |
| 1700 | char *(*devnode)(struct gendisk *disk, umode_t *mode); | ||
| 1700 | struct module *owner; | 1701 | struct module *owner; |
| 1701 | const struct pr_ops *pr_ops; | 1702 | const struct pr_ops *pr_ops; |
| 1702 | }; | 1703 | }; |