diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:17:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:17:46 +0000 |
commit | 7f3a4257159dea8e7ef66d1a539dc6df708b8ed3 (patch) | |
tree | bcc69b5f4609f348fac49e2f59e210b29eaea783 /drivers/zorro/zorro.c | |
parent | Adding upstream version 6.9.12. (diff) | |
download | linux-7f3a4257159dea8e7ef66d1a539dc6df708b8ed3.tar.xz linux-7f3a4257159dea8e7ef66d1a539dc6df708b8ed3.zip |
Adding upstream version 6.10.3.upstream/6.10.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/zorro/zorro.c')
-rw-r--r-- | drivers/zorro/zorro.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c index 1b99286485..2196474ce6 100644 --- a/drivers/zorro/zorro.c +++ b/drivers/zorro/zorro.c @@ -117,17 +117,13 @@ static struct resource __init *zorro_find_parent_resource( int i; for (i = 0; i < bridge->num_resources; i++) { - struct resource *r = &bridge->resource[i]; - - if (zorro_resource_start(z) >= r->start && - zorro_resource_end(z) <= r->end) - return r; + if (resource_contains(&bridge->resource[i], &z->resource)) + return &bridge->resource[i]; } + return &iomem_resource; } - - static int __init amiga_zorro_probe(struct platform_device *pdev) { struct zorro_bus *bus; @@ -176,9 +172,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev) z->slotsize = zi->slotsize; sprintf(z->name, "Zorro device %08x", z->id); zorro_name_device(z); - z->resource.start = zi->boardaddr; - z->resource.end = zi->boardaddr + zi->boardsize - 1; - z->resource.name = z->name; + z->resource = DEFINE_RES_MEM_NAMED(zi->boardaddr, zi->boardsize, z->name); r = zorro_find_parent_resource(pdev, z); error = request_resource(r, &z->resource); if (error && !(z->rom.er_Type & ERTF_MEMLIST)) |