summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_resource.c
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-03-31 17:23:46 +0000
committernjl <njl@FreeBSD.org>2004-03-31 17:23:46 +0000
commitfd0c34e87b18dc4d46cef5a65516486dd7f7090c (patch)
treec1bd07877c41ba3f799b59b9d8c57614d7f3ad73 /sys/dev/acpica/acpi_resource.c
parent9f95817abba7fa2d8012e6af0d47db66ae7c840d (diff)
downloadFreeBSD-src-fd0c34e87b18dc4d46cef5a65516486dd7f7090c.zip
FreeBSD-src-fd0c34e87b18dc4d46cef5a65516486dd7f7090c.tar.gz
Add an interface to pass an argument to the resource parsing functions.
This is just groundwork for changing sysresource behavior. PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after:
Diffstat (limited to 'sys/dev/acpica/acpi_resource.c')
-rw-r--r--sys/dev/acpica/acpi_resource.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c
index e471f82..6c73c40 100644
--- a/sys/dev/acpica/acpi_resource.c
+++ b/sys/dev/acpica/acpi_resource.c
@@ -56,7 +56,7 @@ ACPI_MODULE_NAME("RESOURCE")
*/
ACPI_STATUS
acpi_parse_resources(device_t dev, ACPI_HANDLE handle,
- struct acpi_parse_resource_set *set)
+ struct acpi_parse_resource_set *set, void *arg)
{
ACPI_BUFFER buf;
ACPI_RESOURCE *res;
@@ -86,7 +86,7 @@ acpi_parse_resources(device_t dev, ACPI_HANDLE handle,
}
ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES, "%s - got %ld bytes of resources\n",
acpi_name(handle), (long)buf.Length));
- set->set_init(dev, &context);
+ set->set_init(dev, arg, &context);
/* Iterate through the resources */
curr = buf.Pointer;
@@ -373,7 +373,7 @@ acpi_parse_resources(device_t dev, ACPI_HANDLE handle,
* Resource-set vectors used to attach _CRS-derived resources
* to an ACPI device.
*/
-static void acpi_res_set_init(device_t dev, void **context);
+static void acpi_res_set_init(device_t dev, void *arg, void **context);
static void acpi_res_set_done(device_t dev, void *context);
static void acpi_res_set_ioport(device_t dev, void *context,
u_int32_t base, u_int32_t length);
@@ -411,15 +411,17 @@ struct acpi_res_context {
int ar_nmem;
int ar_nirq;
int ar_ndrq;
+ void *ar_parent;
};
static void
-acpi_res_set_init(device_t dev, void **context)
+acpi_res_set_init(device_t dev, void *arg, void **context)
{
struct acpi_res_context *cp;
if ((cp = AcpiOsAllocate(sizeof(*cp))) != NULL) {
bzero(cp, sizeof(*cp));
+ cp->ar_parent = arg;
*context = cp;
}
}
OpenPOWER on IntegriCloud