diff options
author | Christoph Hellwig <hch@lst.de> | 2020-11-14 21:19:57 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-12-02 00:53:39 +0300 |
commit | c2637e80a09e0d6c698d2771d7230f59c2138122 (patch) | |
tree | 249ad0cdb743770a5d6f87badffec4c0649b3872 /include/linux/genhd.h | |
parent | 3a4174e68684e43ecdcb59126a441b29d5e94f7f (diff) | |
download | linux-c2637e80a09e0d6c698d2771d7230f59c2138122.tar.xz |
init: refactor name_to_dev_t
Split each case into a self-contained helper, and move the block
dependent code entirely under the pre-existing #ifdef CONFIG_BLOCK.
This allows to remove the blk_lookup_devt stub in genhd.h.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r-- | include/linux/genhd.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 22f5b9fd96f8..ca5e356084c3 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -388,18 +388,13 @@ static inline void bd_unlink_disk_holder(struct block_device *bdev, } #endif /* CONFIG_SYSFS */ +dev_t blk_lookup_devt(const char *name, int partno); #ifdef CONFIG_BLOCK void printk_all_partitions(void); -dev_t blk_lookup_devt(const char *name, int partno); #else /* CONFIG_BLOCK */ static inline void printk_all_partitions(void) { } -static inline dev_t blk_lookup_devt(const char *name, int partno) -{ - dev_t devt = MKDEV(0, 0); - return devt; -} #endif /* CONFIG_BLOCK */ #endif /* _LINUX_GENHD_H */ |