Skip to content

Commit

Permalink
[PATCH] cardbus: switch to ref counting/hotplug safe API
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Oct 1, 2006
1 parent df10f4e commit 74ae322
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/pcmcia/cardbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ int read_cb_mem(struct pcmcia_socket * s, int space, u_int addr, u_int len, void

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;

Expand All @@ -152,6 +152,9 @@ int read_cb_mem(struct pcmcia_socket * s, int space, u_int addr, u_int len, void
}

res = dev->resource + space - 1;

pci_dev_put(dev);

if (!res->flags)
goto fail;

Expand Down

0 comments on commit 74ae322

Please sign in to comment.