Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81333
b: refs/heads/master
c: ad7d819
h: refs/heads/master
i:
  81331: 442e7d5
v: v3
  • Loading branch information
Geert Uytterhoeven authored and Paul Mackerras committed Jan 25, 2008
1 parent 4ae05a0 commit 72f41c1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 39 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a4689373915ad7a38e7308538edeef407d1db97
refs/heads/master: ad7d8193e49c5534f76f87b22a6fd80e39be96cc
60 changes: 22 additions & 38 deletions trunk/arch/powerpc/platforms/ps3/repository.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,50 +445,34 @@ int __devinit ps3_repository_find_devices(enum ps3_bus_type bus_type,

pr_debug(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type);

for (repo.bus_index = 0; repo.bus_index < 10; repo.bus_index++) {
repo.bus_type = bus_type;
result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index);
if (result) {
pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__);
return result;
}

result = ps3_repository_read_bus_type(repo.bus_index,
&repo.bus_type);
result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id);
if (result) {
pr_debug("%s:%d read_bus_id(%u) failed\n", __func__, __LINE__,
repo.bus_index);
return result;
}

if (result) {
pr_debug("%s:%d read_bus_type(%u) failed\n",
__func__, __LINE__, repo.bus_index);
for (repo.dev_index = 0; ; repo.dev_index++) {
result = ps3_repository_find_device(&repo);
if (result == -ENODEV) {
result = 0;
break;
} else if (result)
break;
}

if (repo.bus_type != bus_type) {
pr_debug("%s:%d: skip, bus_type %u\n", __func__,
__LINE__, repo.bus_type);
continue;
}

result = ps3_repository_read_bus_id(repo.bus_index,
&repo.bus_id);

result = callback(&repo);
if (result) {
pr_debug("%s:%d read_bus_id(%u) failed\n",
__func__, __LINE__, repo.bus_index);
continue;
}

for (repo.dev_index = 0; ; repo.dev_index++) {
result = ps3_repository_find_device(&repo);

if (result == -ENODEV) {
result = 0;
break;
} else if (result)
break;

result = callback(&repo);

if (result) {
pr_debug("%s:%d: abort at callback\n", __func__,
__LINE__);
break;
}
pr_debug("%s:%d: abort at callback\n", __func__,
__LINE__);
break;
}
break;
}

pr_debug(" <- %s:%d\n", __func__, __LINE__);
Expand Down

0 comments on commit 72f41c1

Please sign in to comment.