* 4. ..
*
*/
-static int is_ejectable (acpi_handle handle)
+static int is_ejectable(acpi_handle handle)
{
acpi_status status;
acpi_handle tmp;
bridge->hpp.enable_PERR = package->package.elements[3].integer.value;
dbg("_HPP parameter = (%02x, %02x, %02x, %02x)\n",
- bridge->hpp.cache_line_size,
- bridge->hpp.latency_timer,
- bridge->hpp.enable_SERR,
- bridge->hpp.enable_PERR);
+ bridge->hpp.cache_line_size,
+ bridge->hpp.latency_timer,
+ bridge->hpp.enable_SERR,
+ bridge->hpp.enable_PERR);
bridge->flags |= BRIDGE_HAS_HPP;
return (unsigned int)sta;
}
+/**
+ * acpiphp_check_bridge - re-enumerate devices
+ *
+ * Iterate over all slots under this bridge and make sure that if a
+ * card is present they are enabled, and if not they are disabled.
+ */
+static int acpiphp_check_bridge(struct acpiphp_bridge *bridge)
+{
+ struct acpiphp_slot *slot;
+ int retval = 0;
+ int enabled, disabled;
+
+ enabled = disabled = 0;
+
+ for (slot = bridge->slots; slot; slot = slot->next) {
+ unsigned int status = get_slot_status(slot);
+ if (slot->flags & SLOT_ENABLED) {
+ if (status == ACPI_STA_ALL)
+ continue;
+ retval = acpiphp_disable_slot(slot);
+ if (retval) {
+ err("Error occurred in disabling\n");
+ goto err_exit;
+ }
+ disabled++;
+ } else {
+ if (status != ACPI_STA_ALL)
+ continue;
+ retval = acpiphp_enable_slot(slot);
+ if (retval) {
+ err("Error occurred in enabling\n");
+ goto err_exit;
+ }
+ enabled++;
+ }
+ }
+
+ dbg("%s: %d enabled, %d disabled\n", __FUNCTION__, enabled, disabled);
+
+ err_exit:
+ return retval;
+}
/*
* ACPI event handlers
kfree(bridge);
}
+
+ acpi_pci_unregister_driver(&acpi_pci_hp_driver);
}
}
+#if 0
/**
* acpiphp_for_each_slot - call function for each slot
* @fn: callback function
* @data: context to be passed to callback function
*
*/
-int acpiphp_for_each_slot(acpiphp_callback fn, void *data)
+static int acpiphp_for_each_slot(acpiphp_callback fn, void *data)
{
struct list_head *node;
struct acpiphp_bridge *bridge;
err_exit:
return retval;
}
-
+#endif
/* search matching slot from id */
struct acpiphp_slot *get_slot_from_id(int id)
}
/* should never happen! */
- err("%s: no object for id %d\n",__FUNCTION__, id);
+ err("%s: no object for id %d\n", __FUNCTION__, id);
+ WARN_ON(1);
return 0;
}
}
-/**
- * acpiphp_check_bridge - re-enumerate devices
- *
- * Iterate over all slots under this bridge and make sure that if a
- * card is present they are enabled, and if not they are disabled.
- */
-int acpiphp_check_bridge(struct acpiphp_bridge *bridge)
-{
- struct acpiphp_slot *slot;
- int retval = 0;
- int enabled, disabled;
-
- enabled = disabled = 0;
-
- for (slot = bridge->slots; slot; slot = slot->next) {
- unsigned int status = get_slot_status(slot);
- if (slot->flags & SLOT_ENABLED) {
- if (status == ACPI_STA_ALL)
- continue;
- retval = acpiphp_disable_slot(slot);
- if (retval) {
- err("Error occurred in disabling\n");
- goto err_exit;
- }
- disabled++;
- } else {
- if (status != ACPI_STA_ALL)
- continue;
- retval = acpiphp_enable_slot(slot);
- if (retval) {
- err("Error occurred in enabling\n");
- goto err_exit;
- }
- enabled++;
- }
- }
-
- dbg("%s: %d enabled, %d disabled\n", __FUNCTION__, enabled, disabled);
-
- err_exit:
- return retval;
-}
-
-
/*
* slot enabled: 1
* slot disabled: 0