pcmcia: switch to ref counting/hotplug safe API
PATCH 1/1 pcmcia: switch to ref counting/hotplug safe API
Signed-off-by Alan Cox <[email protected]>
drivers/pcmcia/cardbus.c +4 -1
@@ -138,7 +138,7 @@cs_dbg (s,3 ,"read_cb_mem(%d, %#x, %u)\n" , space, addr, len); - dev =pci_find_slot (s->cb_dev->subordinate->number,0 ); + dev =pci_get_slot (s->cb_dev->subordinate,0 );if (!dev) goto fail;
@@ -152,6 +152,9 @@ } res = dev->resource + space -1 ; + +pci_dev_put (dev); +if (!res->flags) goto fail;