Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53365
b: refs/heads/master
c: 517d5a0
h: refs/heads/master
i:
  53363: c5926db
v: v3
  • Loading branch information
Linas Vepstas authored and Greg Kroah-Hartman committed May 3, 2007
1 parent 1fd0876 commit fec5f22
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 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: 3499f0726ec179afd19669070681ac457d27033f
refs/heads/master: 517d5a0417e19101eaa769039d1921d626ee546c
37 changes: 13 additions & 24 deletions trunk/drivers/pci/hotplug/rpaphp_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,6 @@ static void print_slot_pci_funcs(struct pci_bus *bus)
return;
}

static int setup_pci_hotplug_slot_info(struct slot *slot)
{
struct hotplug_slot_info *hotplug_slot_info = slot->hotplug_slot->info;

dbg("%s Initilize the PCI slot's hotplug->info structure ...\n",
__FUNCTION__);
rpaphp_get_power_status(slot, &hotplug_slot_info->power_status);
rpaphp_get_pci_adapter_status(slot, 1,
&hotplug_slot_info->adapter_status);
if (hotplug_slot_info->adapter_status == NOT_VALID) {
err("%s: NOT_VALID: skip dn->full_name=%s\n",
__FUNCTION__, slot->dn->full_name);
return -EINVAL;
}
return 0;
}

static void set_slot_name(struct slot *slot)
{
struct pci_bus *bus = slot->bus;
Expand Down Expand Up @@ -200,14 +183,20 @@ static int setup_pci_slot(struct slot *slot)

int rpaphp_register_pci_slot(struct slot *slot)
{
int rc = -EINVAL;
struct hotplug_slot_info *info = slot->hotplug_slot->info;

rpaphp_get_power_status(slot, &info->power_status);
rpaphp_get_pci_adapter_status(slot, 1, &info->adapter_status);

if (info->adapter_status == NOT_VALID) {
err("%s: NOT_VALID: skip dn->full_name=%s\n",
__FUNCTION__, slot->dn->full_name);
return -EINVAL;
}

if (setup_pci_hotplug_slot_info(slot))
goto exit_rc;
if (setup_pci_slot(slot))
goto exit_rc;
rc = rpaphp_register_slot(slot);
exit_rc:
return rc;
return -EINVAL;

return rpaphp_register_slot(slot);
}

0 comments on commit fec5f22

Please sign in to comment.