dm: core: Update uclass_find_next_free_req_seq() args
At present this is passed a uclass ID and it has to do a lookup. The callers all have the uclass pointer, except for the I2C uclass where the code will soon be deleted. Update the argument to a uclass * instead of an ID since it is more efficient. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -272,17 +272,11 @@ int uclass_find_device_by_name(enum uclass_id id, const char *name,
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
int uclass_find_next_free_req_seq(enum uclass_id id)
|
||||
int uclass_find_next_free_req_seq(struct uclass *uc)
|
||||
{
|
||||
struct uclass *uc;
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
int max = -1;
|
||||
|
||||
ret = uclass_get(id, &uc);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
list_for_each_entry(dev, &uc->dev_head, uclass_node) {
|
||||
if ((dev->req_seq != -1) && (dev->req_seq > max))
|
||||
max = dev->req_seq;
|
||||
|
Reference in New Issue
Block a user