<p>Nico Huber has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/26290">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">device/device_simple: Drop dev_find_slot_on_smbus()<br><br>It's using the secondary bus number to identify devices. This is,<br>however, unfeasible as the bus numbers are not filled in the static<br>device tree.<br><br>AFAICS, nobody is using this implementation at the moment.<br><br>Change-Id: I395d02f3d9d2678d640518c79b6d8632505d5ad9<br>Signed-off-by: Nico Huber <nico.huber@secunet.com><br>---<br>M src/device/device_simple.c<br>1 file changed, 0 insertions(+), 24 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/26290/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/device/device_simple.c b/src/device/device_simple.c</span><br><span>index 2cacb4a..4a5faf6 100644</span><br><span>--- a/src/device/device_simple.c</span><br><span>+++ b/src/device/device_simple.c</span><br><span>@@ -75,30 +75,6 @@</span><br><span> }</span><br><span> </span><br><span> /**</span><br><span style="color: hsl(0, 100%, 40%);">- * Given an SMBus bus and a device number, find the device structure.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * @param bus The bus number.</span><br><span style="color: hsl(0, 100%, 40%);">- * @param addr A device number.</span><br><span style="color: hsl(0, 100%, 40%);">- * @return Pointer to the device structure (if found), 0 otherwise.</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-DEVTREE_CONST struct device *dev_find_slot_on_smbus(unsigned int bus,</span><br><span style="color: hsl(0, 100%, 40%);">-                                                 unsigned int addr)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-     DEVTREE_CONST struct device *dev, *result;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-      result = 0;</span><br><span style="color: hsl(0, 100%, 40%);">-     for (dev = all_devices; dev; dev = dev->next) {</span><br><span style="color: hsl(0, 100%, 40%);">-              if ((dev->path.type == DEVICE_PATH_I2C) &&</span><br><span style="color: hsl(0, 100%, 40%);">-               (dev->bus->secondary == bus) &&</span><br><span style="color: hsl(0, 100%, 40%);">-                   (dev->path.i2c.device == addr)) {</span><br><span style="color: hsl(0, 100%, 40%);">-                        result = dev;</span><br><span style="color: hsl(0, 100%, 40%);">-                   break;</span><br><span style="color: hsl(0, 100%, 40%);">-          }</span><br><span style="color: hsl(0, 100%, 40%);">-       }</span><br><span style="color: hsl(0, 100%, 40%);">-       return result;</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/**</span><br><span>  * Given a PnP port and a device number, find the device structure.</span><br><span>  *</span><br><span>  * @param port The I/O port.</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/26290">change 26290</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/26290"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I395d02f3d9d2678d640518c79b6d8632505d5ad9 </div>
<div style="display:none"> Gerrit-Change-Number: 26290 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nico Huber <nico.h@gmx.de> </div>