Skip to content

Commit

Permalink
block: fix the kerneldoc comment for __register_blkdev
Browse files Browse the repository at this point in the history
Switch the comment to talk about __register_blkdev instead of
register_blkdev and document the new probe parameter.

Fixes: 3da1a61e7046 ("block: add an optional probe callback to major_names")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Nov 16, 2020
1 parent e418de3 commit e2b6b30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,12 @@ void blkdev_show(struct seq_file *seqf, off_t offset)
#endif /* CONFIG_PROC_FS */

/**
* register_blkdev - register a new block device
* __register_blkdev - register a new block device
*
* @major: the requested major device number [1..BLKDEV_MAJOR_MAX-1]. If
* @major = 0, try to allocate any unused major number.
* @name: the name of the new block device as a zero terminated string
* @probe: allback that is called on access to any minor number of @major
*
* The @name must be unique within the system.
*
Expand All @@ -436,6 +437,8 @@ void blkdev_show(struct seq_file *seqf, off_t offset)
*
* See Documentation/admin-guide/devices.txt for the list of allocated
* major numbers.
*
* Use register_blkdev instead for any new code.
*/
int __register_blkdev(unsigned int major, const char *name,
void (*probe)(dev_t devt))
Expand Down

0 comments on commit e2b6b30

Please sign in to comment.