From 1b50985db4e85030de3567792aedc13aa26e0fea Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Mon, 13 May 2013 09:16:00 +0800 Subject: discover: Always associate resources with a boot option We should always be tallocing resources to a boot option context; anything else (for example, the discover context) may have a different lifetime. In order to enforce this, we change the void *ctx argument to the context_create functions to a struct discover_boot_option. Signed-off-by: Jeremy Kerr --- discover/resource.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'discover/resource.h') diff --git a/discover/resource.h b/discover/resource.h index 7794ee5..3ef13a5 100644 --- a/discover/resource.h +++ b/discover/resource.h @@ -3,6 +3,7 @@ #include +struct discover_boot_option; struct discover_device; struct device_handler; struct pb_url; @@ -36,11 +37,12 @@ struct resource { * callback. */ -struct resource *create_devpath_resource(void *ctx, +struct resource *create_devpath_resource(struct discover_boot_option *opt, struct discover_device *orig_device, const char *devpath); -struct resource *create_url_resource(void *ctx, struct pb_url *url); +struct resource *create_url_resource(struct discover_boot_option *opt, + struct pb_url *url); bool resolve_devpath_resource(struct device_handler *dev, struct resource *res); -- cgit v1.2.1