'\" t .\" Title: __shost_for_each_device .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: SCSI mid layer .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "__SHOST_FOR_EACH_DEV" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "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" __shost_for_each_device \- iterate over all devices of a host (UNLOCKED) .SH "SYNOPSIS" .HP \w'__shost_for_each_device('u .BI "__shost_for_each_device(" "sdev" ", " "shost" ");" .SH "ARGUMENTS" .PP \fIsdev\fR .RS 4 the struct scsi_device to use as a cursor .RE .PP \fIshost\fR .RS 4 the struct scsi_host to iterate over .RE .SH "DESCRIPTION" .PP Iterator that returns each device attached to \fIshost\fR\&. It does _not_ take a reference on the scsi_device, so the whole loop must be protected by shost\->host_lock\&. .SH "NOTE" .PP The only reason to use this is because you need to access the device list in interrupt context\&. Otherwise you really want to use shost_for_each_device instead\&. .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