[PATCH 2/13] pcmcia: tiny yenta_socket.c cleanup

Dominik Brodowski linux at dominikbrodowski.net
Wed Sep 7 17:36:46 EDT 2005


pci_set_power_state is not needed, as we call pci_enable_device()
somewhere else. Also, the resource we write to PCI_BASE_ADDRESS_0 needs
to be converted to bus-centric view first.

Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---

 drivers/pcmcia/yenta_socket.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Index: 2.6.13-git4/drivers/pcmcia/yenta_socket.c
===================================================================
--- 2.6.13-git4.orig/drivers/pcmcia/yenta_socket.c
+++ 2.6.13-git4/drivers/pcmcia/yenta_socket.c
@@ -919,11 +919,12 @@ static void yenta_config_init(struct yen
 {
 	u16 bridge;
 	struct pci_dev *dev = socket->dev;
+	struct pci_bus_region region;
 
-	pci_set_power_state(socket->dev, 0);
+	pcibios_resource_to_bus(socket->dev, &region, &dev->resource[0]);
 
 	config_writel(socket, CB_LEGACY_MODE_BASE, 0);
-	config_writel(socket, PCI_BASE_ADDRESS_0, dev->resource[0].start);
+	config_writel(socket, PCI_BASE_ADDRESS_0, region.start);
 	config_writew(socket, PCI_COMMAND,
 			PCI_COMMAND_IO |
 			PCI_COMMAND_MEMORY |



More information about the linux-pcmcia mailing list