aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/ds.c2
-rw-r--r--drivers/pcmcia/yenta_socket.c27
2 files changed, 10 insertions, 19 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index d63f22a5bf7e..43da2e92d50f 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -589,8 +589,8 @@ static void pcmcia_delayed_add_pseudo_device(void *data)
589static inline void pcmcia_add_pseudo_device(struct pcmcia_socket *s) 589static inline void pcmcia_add_pseudo_device(struct pcmcia_socket *s)
590{ 590{
591 if (!s->pcmcia_state.device_add_pending) { 591 if (!s->pcmcia_state.device_add_pending) {
592 schedule_work(&s->device_add);
593 s->pcmcia_state.device_add_pending = 1; 592 s->pcmcia_state.device_add_pending = 1;
593 schedule_work(&s->device_add);
594 } 594 }
595 return; 595 return;
596} 596}
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 744e469a9eda..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
606static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned type, int addr_start, int addr_end) 606static 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, &region);
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;
@@ -642,6 +639,7 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ
642 (yenta_search_res(socket, res, BRIDGE_IO_MIN))) { 639 (yenta_search_res(socket, res, BRIDGE_IO_MIN))) {
643 config_writel(socket, addr_start, res->start); 640 config_writel(socket, addr_start, res->start);
644 config_writel(socket, addr_end, res->end); 641 config_writel(socket, addr_end, res->end);
642 return;
645 } 643 }
646 } else { 644 } else {
647 if (type & IORESOURCE_PREFETCH) { 645 if (type & IORESOURCE_PREFETCH) {
@@ -650,6 +648,7 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ
650 (yenta_search_res(socket, res, BRIDGE_MEM_MIN))) { 648 (yenta_search_res(socket, res, BRIDGE_MEM_MIN))) {
651 config_writel(socket, addr_start, res->start); 649 config_writel(socket, addr_start, res->start);
652 config_writel(socket, addr_end, res->end); 650 config_writel(socket, addr_end, res->end);
651 return;
653 } 652 }
654 /* Approximating prefetchable by non-prefetchable */ 653 /* Approximating prefetchable by non-prefetchable */
655 res->flags = IORESOURCE_MEM; 654 res->flags = IORESOURCE_MEM;
@@ -659,6 +658,7 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ
659 (yenta_search_res(socket, res, BRIDGE_MEM_MIN))) { 658 (yenta_search_res(socket, res, BRIDGE_MEM_MIN))) {
660 config_writel(socket, addr_start, res->start); 659 config_writel(socket, addr_start, res->start);
661 config_writel(socket, addr_end, res->end); 660 config_writel(socket, addr_end, res->end);
661 return;
662 } 662 }
663 } 663 }
664 664
@@ -1107,8 +1107,6 @@ static int yenta_dev_suspend (struct pci_dev *dev, pm_message_t state)
1107 pci_read_config_dword(dev, 17*4, &socket->saved_state[1]); 1107 pci_read_config_dword(dev, 17*4, &socket->saved_state[1]);
1108 pci_disable_device(dev); 1108 pci_disable_device(dev);
1109 1109
1110 free_irq(dev->irq, socket);
1111
1112 /* 1110 /*
1113 * Some laptops (IBM T22) do not like us putting the Cardbus 1111 * Some laptops (IBM T22) do not like us putting the Cardbus
1114 * bridge into D3. At a guess, some other laptop will 1112 * bridge into D3. At a guess, some other laptop will
@@ -1134,13 +1132,6 @@ static int yenta_dev_resume (struct pci_dev *dev)
1134 pci_enable_device(dev); 1132 pci_enable_device(dev);
1135 pci_set_master(dev); 1133 pci_set_master(dev);
1136 1134
1137 if (socket->cb_irq)
1138 if (request_irq(socket->cb_irq, yenta_interrupt,
1139 SA_SHIRQ, "yenta", socket)) {
1140 printk(KERN_WARNING "Yenta: request_irq() failed on resume!\n");
1141 socket->cb_irq = 0;
1142 }
1143
1144 if (socket->type && socket->type->restore_state) 1135 if (socket->type && socket->type->restore_state)
1145 socket->type->restore_state(socket); 1136 socket->type->restore_state(socket);
1146 } 1137 }