1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>scsi_host_lookup</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="SCSI Interfaces Guide"><link rel="up" href="mid_layer.html#hosts.c" title="drivers/scsi/hosts.c"><link rel="prev" href="API-scsi-host-alloc.html" title="scsi_host_alloc"><link rel="next" href="API-scsi-host-get.html" title="scsi_host_get"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">scsi_host_lookup</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-scsi-host-alloc.html">Prev</a> </td><th width="60%" align="center">drivers/scsi/hosts.c</th><td width="20%" align="right"> <a accesskey="n" href="API-scsi-host-get.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-scsi-host-lookup"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>scsi_host_lookup — 2 get a reference to a Scsi_Host by host no 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">struct Scsi_Host * <b class="fsfunc">scsi_host_lookup </b>(</code></td><td>unsigned short <var class="pdparam">hostnum</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1124308380"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>hostnum</code></em></span></dt><dd><p> 4 host number to locate 5 </p></dd></dl></div></div><div class="refsect1"><a name="idp1124309996"></a><h2>Return value</h2><p> 6 A pointer to located Scsi_Host or NULL. 7 </p><p> 8 9 The caller must do a <code class="function">scsi_host_put</code> to drop the reference 10 that <code class="function">scsi_host_get</code> took. The <code class="function">put_device</code> below dropped 11 the reference from <code class="function">class_find_device</code>. 12</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-scsi-host-alloc.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mid_layer.html#hosts.c">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-scsi-host-get.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">scsi_host_alloc</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">scsi_host_get</span></td></tr></table></div></body></html> 13