]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Make cardbus device_register work
authorPeter Osterlund <petero2@telia.com>
Sat, 9 Feb 2002 12:20:19 +0000 (04:20 -0800)
committerDavid S. Miller <davem@redhat.com>
Sat, 9 Feb 2002 12:20:19 +0000 (04:20 -0800)
It compiles in -pre5 but doesn't work unless you also apply the patch
below. Without this patch, bus_id will be empty which makes
device_register fail.

drivers/pcmcia/cardbus.c

index 7001c37d167c6f80c5c3e025f9a2841476f659bd..580c9d93b64b22c8fd503302c2cf84392d25df45 100644 (file)
@@ -279,13 +279,13 @@ int cb_alloc(socket_info_t * s)
                pci_readw(dev, PCI_DEVICE_ID, &dev->device);
                dev->hdr_type = hdr & 0x7f;
 
+               pci_setup_device(dev);
+
                dev->dev.parent = bus->dev;
                strcpy(dev->dev.name, dev->name);
                strcpy(dev->dev.bus_id, dev->slot_name);
                device_register(&dev->dev);
 
-               pci_setup_device(dev);
-
                /* FIXME: Do we need to enable the expansion ROM? */
                for (r = 0; r < 7; r++) {
                        struct resource *res = dev->resource + r;