Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358416
b: refs/heads/master
c: d59f53b
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Bjorn Helgaas committed Jan 25, 2013
1 parent 9a40fae commit 59c0490
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 45 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: 121b090e7d4063b65f40c267ef0fb34fb278dfdf
refs/heads/master: d59f53bc9bd80ee62072dea590fc623c67cb84a8
1 change: 0 additions & 1 deletion trunk/drivers/pci/hotplug/acpiphp.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ extern void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);
/* acpiphp_glue.c */
extern int acpiphp_glue_init (void);
extern void acpiphp_glue_exit (void);
extern int acpiphp_get_num_slots (void);
typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);

extern int acpiphp_enable_slot (struct acpiphp_slot *slot);
Expand Down
23 changes: 2 additions & 21 deletions trunk/drivers/pci/hotplug/acpiphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
bool acpiphp_debug;

/* local variables */
static int num_slots;
static struct acpiphp_attention_info *attention_info;

#define DRIVER_VERSION "0.5"
Expand Down Expand Up @@ -272,25 +271,6 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
return 0;
}

static int __init init_acpi(void)
{
int retval;

/* initialize internal data structure etc. */
retval = acpiphp_glue_init();

/* read initial number of slots */
if (!retval) {
num_slots = acpiphp_get_num_slots();
if (num_slots == 0) {
acpiphp_glue_exit();
retval = -ENODEV;
}
}

return retval;
}

/**
* release_slot - free up the memory used by a slot
* @hotplug_slot: slot to free
Expand Down Expand Up @@ -379,7 +359,8 @@ static int __init acpiphp_init(void)
return 0;

/* read all the ACPI info from the system */
return init_acpi();
/* initialize internal data structure etc. */
return acpiphp_glue_init();
}


Expand Down
22 changes: 0 additions & 22 deletions trunk/drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1416,28 +1416,6 @@ void acpiphp_glue_exit(void)
acpi_pci_unregister_driver(&acpi_pci_hp_driver);
}


/**
* acpiphp_get_num_slots - count number of slots in a system
*/
int __init acpiphp_get_num_slots(void)
{
struct acpiphp_bridge *bridge;
int num_slots = 0;

list_for_each_entry(bridge, &bridge_list, list) {
dbg("Bus %04x:%02x has %d slot%s\n",
pci_domain_nr(bridge->pci_bus),
bridge->pci_bus->number, bridge->nr_slots,
bridge->nr_slots == 1 ? "" : "s");
num_slots += bridge->nr_slots;
}

dbg("Total %d slots\n", num_slots);
return num_slots;
}


/**
* acpiphp_enable_slot - power on slot
* @slot: ACPI PHP slot
Expand Down

0 comments on commit 59c0490

Please sign in to comment.