diff options
Diffstat (limited to 'drivers/pcmcia/yenta_socket.c')
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 91e7457d5b04..62fd705203fb 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -605,9 +605,8 @@ static int yenta_search_res(struct yenta_socket *socket, struct resource *res, | |||
605 | 605 | ||
606 | static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned type, int addr_start, int addr_end) | 606 | static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned type, int addr_start, int addr_end) |
607 | { | 607 | { |
608 | struct pci_bus *bus; | ||
609 | struct resource *root, *res; | 608 | struct resource *root, *res; |
610 | u32 start, end; | 609 | struct pci_bus_region region; |
611 | unsigned mask; | 610 | unsigned mask; |
612 | 611 | ||
613 | res = socket->dev->resource + PCI_BRIDGE_RESOURCES + nr; | 612 | res = socket->dev->resource + PCI_BRIDGE_RESOURCES + nr; |
@@ -620,15 +619,13 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ | |||
620 | if (type & IORESOURCE_IO) | 619 | if (type & IORESOURCE_IO) |
621 | mask = ~3; | 620 | mask = ~3; |
622 | 621 | ||
623 | bus = socket->dev->subordinate; | 622 | res->name = socket->dev->subordinate->name; |
624 | res->name = bus->name; | ||
625 | res->flags = type; | 623 | res->flags = type; |
626 | 624 | ||
627 | start = config_readl(socket, addr_start) & mask; | 625 | region.start = config_readl(socket, addr_start) & mask; |
628 | end = config_readl(socket, addr_end) | ~mask; | 626 | region.end = config_readl(socket, addr_end) | ~mask; |
629 | if (start && end > start && !override_bios) { | 627 | if (region.start && region.end > region.start && !override_bios) { |
630 | res->start = start; | 628 | pcibios_bus_to_resource(socket->dev, res, ®ion); |
631 | res->end = end; | ||
632 | root = pci_find_parent_resource(socket->dev, res); | 629 | root = pci_find_parent_resource(socket->dev, res); |
633 | if (root && (request_resource(root, res) == 0)) | 630 | if (root && (request_resource(root, res) == 0)) |
634 | return; | 631 | return; |