diff options
Diffstat (limited to 'kernel/drivers/base/platform.c')
-rw-r--r-- | kernel/drivers/base/platform.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/drivers/base/platform.c b/kernel/drivers/base/platform.c index ebf034b97..7403de948 100644 --- a/kernel/drivers/base/platform.c +++ b/kernel/drivers/base/platform.c @@ -375,9 +375,7 @@ int platform_device_add(struct platform_device *pdev) while (--i >= 0) { struct resource *r = &pdev->resource[i]; - unsigned long type = resource_type(r); - - if (type == IORESOURCE_MEM || type == IORESOURCE_IO) + if (r->parent) release_resource(r); } @@ -408,9 +406,7 @@ void platform_device_del(struct platform_device *pdev) for (i = 0; i < pdev->num_resources; i++) { struct resource *r = &pdev->resource[i]; - unsigned long type = resource_type(r); - - if (type == IORESOURCE_MEM || type == IORESOURCE_IO) + if (r->parent) release_resource(r); } } |