diff options
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index bee05362fd24..02b23abc2df1 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -549,6 +549,11 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ | |||
549 | unsigned offset; | 549 | unsigned offset; |
550 | unsigned mask; | 550 | unsigned mask; |
551 | 551 | ||
552 | res = socket->dev->resource + PCI_BRIDGE_RESOURCES + nr; | ||
553 | /* Already allocated? */ | ||
554 | if (res->parent) | ||
555 | return 0; | ||
556 | |||
552 | /* The granularity of the memory limit is 4kB, on IO it's 4 bytes */ | 557 | /* The granularity of the memory limit is 4kB, on IO it's 4 bytes */ |
553 | mask = ~0xfff; | 558 | mask = ~0xfff; |
554 | if (type & IORESOURCE_IO) | 559 | if (type & IORESOURCE_IO) |
@@ -556,7 +561,6 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ | |||
556 | 561 | ||
557 | offset = 0x1c + 8*nr; | 562 | offset = 0x1c + 8*nr; |
558 | bus = socket->dev->subordinate; | 563 | bus = socket->dev->subordinate; |
559 | res = socket->dev->resource + PCI_BRIDGE_RESOURCES + nr; | ||
560 | res->name = bus->name; | 564 | res->name = bus->name; |
561 | res->flags = type; | 565 | res->flags = type; |
562 | res->start = 0; | 566 | res->start = 0; |