---
name: "alloc_chrdev_region"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/alloc_chrdev_region"
---

# alloc\_chrdev\_region(9)

register a range of char device numbers

## NAME

alloc\_chrdev\_region - register a range of char device numbers

## SYNOPSIS

**int alloc\_chrdev\_region(dev\_t \*** *dev***, unsigned** *baseminor***, unsigned** *count***, const char \*** *name***);**

## ARGUMENTS

*dev*

output parameter for first assigned number

*baseminor*

first of the requested range of minor numbers

*count*

the number of minor numbers required

*name*

the name of the associated device or driver

## DESCRIPTION

Allocates a range of char device numbers. The major number will be chosen dynamically, and returned (along with the first minor number) in *dev*. Returns zero or a negative error code.

## COPYRIGHT
