'\" t .\" Title: cdev_add .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Char devices .\" Source: Kernel Hackers Manual 4.11.6 .\" Language: English .\" .TH "CDEV_ADD" "9" "July 2017" "Kernel Hackers Manual 4\&.11\&" "Char devices" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" cdev_add \- add a char device to the system .SH "SYNOPSIS" .HP \w'int\ cdev_add('u .BI "int cdev_add(struct\ cdev\ *\ " "p" ", dev_t\ " "dev" ", unsigned\ " "count" ");" .SH "ARGUMENTS" .PP \fIstruct cdev * p\fR .RS 4 the cdev structure for the device .RE .PP \fIdev_t dev\fR .RS 4 the first device number for which this device is responsible .RE .PP \fIunsigned count\fR .RS 4 the number of consecutive minor numbers corresponding to this device .RE .SH "DESCRIPTION" .PP \fBcdev_add\fR adds the device represented by \fIp\fR to the system, making it live immediately\&. A negative error code is returned on failure\&. .SH "COPYRIGHT" .br