Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53360
b: refs/heads/master
c: bf8cbae
h: refs/heads/master
v: v3
  • Loading branch information
Linas Vepstas authored and Greg Kroah-Hartman committed May 3, 2007
1 parent 2c5034b commit afefc81
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 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: f14e3136509e3825a83f6689cb709f41dfacea47
refs/heads/master: bf8cbae47559170d2f2947dd547492714f195dd3
40 changes: 20 additions & 20 deletions trunk/drivers/pci/hotplug/rpaphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,32 +299,32 @@ int rpaphp_add_slot(struct device_node *dn)
const int *indexes, *names, *types, *power_domains;
char *name, *type;

if (!dn->name || strcmp(dn->name, "pci"))
return 0;

if (!is_php_dn(dn, &indexes, &names, &types, &power_domains))
return 0;

dbg("Entry %s: dn->full_name=%s\n", __FUNCTION__, dn->full_name);

/* register PCI devices */
if (dn->name != 0 && strcmp(dn->name, "pci") == 0) {
if (!is_php_dn(dn, &indexes, &names, &types, &power_domains))
goto exit;

name = (char *) &names[1];
type = (char *) &types[1];
for (i = 0; i < indexes[0]; i++,
name += (strlen(name) + 1), type += (strlen(type) + 1)) {

if (!(slot = alloc_slot_struct(dn, indexes[i + 1], name,
power_domains[i + 1]))) {
retval = -ENOMEM;
goto exit;
}
slot->type = simple_strtoul(type, NULL, 10);
name = (char *) &names[1];
type = (char *) &types[1];
for (i = 0; i < indexes[0]; i++) {

slot = alloc_slot_struct(dn, indexes[i + 1], name, power_domains[i + 1]);
if (!slot)
return -ENOMEM;

slot->type = simple_strtoul(type, NULL, 10);

dbg("Found drc-index:0x%x drc-name:%s drc-type:%s\n",
indexes[i + 1], name, type);
dbg("Found drc-index:0x%x drc-name:%s drc-type:%s\n",
indexes[i + 1], name, type);

retval = rpaphp_register_pci_slot(slot);
}
retval = rpaphp_register_pci_slot(slot);
name += strlen(name) + 1;
type += strlen(type) + 1;
}
exit:
dbg("%s - Exit: num_slots=%d rc[%d]\n",
__FUNCTION__, num_slots, retval);
return retval;
Expand Down

0 comments on commit afefc81

Please sign in to comment.