'\" t .\" Title: scsi_alloc_target .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: SCSI mid layer .\" Source: Kernel Hackers Manual 4.11.6 .\" Language: English .\" .TH "SCSI_ALLOC_TARGET" "9" "July 2017" "Kernel Hackers Manual 4\&.11\&" "SCSI mid layer" .\" ----------------------------------------------------------------- .\" * 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" scsi_alloc_target \- allocate a new or find an existing target .SH "SYNOPSIS" .HP \w'struct\ scsi_target\ *\ scsi_alloc_target('u .BI "struct scsi_target * scsi_alloc_target(struct\ device\ *\ " "parent" ", int\ " "channel" ", uint\ " "id" ");" .SH "ARGUMENTS" .PP \fIstruct device * parent\fR .RS 4 parent of the target (need not be a scsi host) .RE .PP \fIint channel\fR .RS 4 target channel number (zero if no channels) .RE .PP \fIuint id\fR .RS 4 target id number .RE .SH "DESCRIPTION" .PP Return an existing target if one exists, provided it hasn\*(Aqt already gone into STARGET_DEL state, otherwise allocate a new target\&. .PP The target is returned with an incremented reference, so the caller is responsible for both reaping and doing a last put .SH "AUTHORS" .PP \fBJames Bottomley\fR <\&James.Bottomley@hansenpartnership.com\&> .RS 4 Author. .RE .PP \fBRob Landley\fR <\&rob@landley.net\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br