[coreboot-gerrit] Change in coreboot[master]: device/device_simple: Drop dev_find_slot_on_smbus()

Nico Huber (Code Review) gerrit at coreboot.org
Tue May 15 14:22:48 CEST 2018


Nico Huber has uploaded this change for review. ( https://review.coreboot.org/26290


Change subject: device/device_simple: Drop dev_find_slot_on_smbus()
......................................................................

device/device_simple: Drop dev_find_slot_on_smbus()

It's using the secondary bus number to identify devices. This is,
however, unfeasible as the bus numbers are not filled in the static
device tree.

AFAICS, nobody is using this implementation at the moment.

Change-Id: I395d02f3d9d2678d640518c79b6d8632505d5ad9
Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
M src/device/device_simple.c
1 file changed, 0 insertions(+), 24 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/26290/1

diff --git a/src/device/device_simple.c b/src/device/device_simple.c
index 2cacb4a..4a5faf6 100644
--- a/src/device/device_simple.c
+++ b/src/device/device_simple.c
@@ -75,30 +75,6 @@
 }
 
 /**
- * Given an SMBus bus and a device number, find the device structure.
- *
- * @param bus The bus number.
- * @param addr A device number.
- * @return Pointer to the device structure (if found), 0 otherwise.
- */
-DEVTREE_CONST struct device *dev_find_slot_on_smbus(unsigned int bus,
-							unsigned int addr)
-{
-	DEVTREE_CONST struct device *dev, *result;
-
-	result = 0;
-	for (dev = all_devices; dev; dev = dev->next) {
-		if ((dev->path.type == DEVICE_PATH_I2C) &&
-		    (dev->bus->secondary == bus) &&
-		    (dev->path.i2c.device == addr)) {
-			result = dev;
-			break;
-		}
-	}
-	return result;
-}
-
-/**
  * Given a PnP port and a device number, find the device structure.
  *
  * @param port The I/O port.

-- 
To view, visit https://review.coreboot.org/26290
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I395d02f3d9d2678d640518c79b6d8632505d5ad9
Gerrit-Change-Number: 26290
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180515/03c62ca0/attachment-0001.html>


More information about the coreboot-gerrit mailing list