Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

block: add documentation for register_blkdev()

Add documentation for register_blkdev() function and for the parameters.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

authored by

Márton Németh and committed by
Jens Axboe
9e8c0bcc b2bf9683

+16
+16
block/genhd.c
··· 256 256 } 257 257 #endif /* CONFIG_PROC_FS */ 258 258 259 + /** 260 + * register_blkdev - register a new block device 261 + * 262 + * @major: the requested major device number [1..255]. If @major=0, try to 263 + * allocate any unused major number. 264 + * @name: the name of the new block device as a zero terminated string 265 + * 266 + * The @name must be unique within the system. 267 + * 268 + * The return value depends on the @major input parameter. 269 + * - if a major device number was requested in range [1..255] then the 270 + * function returns zero on success, or a negative error code 271 + * - if any unused major number was requested with @major=0 parameter 272 + * then the return value is the allocated major number in range 273 + * [1..255] or a negative error code otherwise 274 + */ 259 275 int register_blkdev(unsigned int major, const char *name) 260 276 { 261 277 struct blk_major_name **n, *p;