'\" t .\" Title: starget_for_each_device .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: SCSI mid layer .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "STARGET_FOR_EACH_DEV" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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" starget_for_each_device \- helper to walk all devices of a target .SH "SYNOPSIS" .HP \w'void\ starget_for_each_device('u .BI "void starget_for_each_device(struct\ scsi_target\ *\ " "starget" ", void\ *\ " "data" ", void\ (*" "fn" ")\ (struct\ scsi_device\ *,\ void\ *));" .SH "ARGUMENTS" .PP \fIstarget\fR .RS 4 target whose devices we want to iterate over\&. .RE .PP \fIdata\fR .RS 4 Opaque passed to each function call\&. .RE .PP \fIfn\fR .RS 4 Function to call on each device .RE .SH "DESCRIPTION" .PP This traverses over each device of \fIstarget\fR\&. The devices have a reference that must be released by scsi_host_put when breaking out of the loop\&. .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