]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/firewire/fw-card.c
firewire: fw-ohci: add option for remote debugging
[linux-2.6-omap-h63xx.git] / drivers / firewire / fw-card.c
index a03462750b95ee0045408a5c8d669ba7bc3d461d..140b34d477de4d580f01501bdfd7764c3cd4ff12 100644 (file)
@@ -398,7 +398,6 @@ fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver,
 {
        static atomic_t index = ATOMIC_INIT(-1);
 
-       kref_init(&card->kref);
        atomic_set(&card->device_count, 0);
        card->index = atomic_inc_return(&index);
        card->driver = driver;
@@ -429,12 +428,6 @@ fw_card_add(struct fw_card *card,
        card->link_speed = link_speed;
        card->guid = guid;
 
-       /*
-        * The subsystem grabs a reference when the card is added and
-        * drops it when the driver calls fw_core_remove_card.
-        */
-       fw_card_get(card);
-
        mutex_lock(&card_mutex);
        config_rom = generate_config_rom(card, &length);
        list_add_tail(&card->link, &card_list);
@@ -540,40 +533,9 @@ fw_core_remove_card(struct fw_card *card)
        cancel_delayed_work_sync(&card->work);
        fw_flush_transactions(card);
        del_timer_sync(&card->flush_timer);
-
-       fw_card_put(card);
 }
 EXPORT_SYMBOL(fw_core_remove_card);
 
-struct fw_card *
-fw_card_get(struct fw_card *card)
-{
-       kref_get(&card->kref);
-
-       return card;
-}
-EXPORT_SYMBOL(fw_card_get);
-
-static void
-release_card(struct kref *kref)
-{
-       struct fw_card *card = container_of(kref, struct fw_card, kref);
-
-       kfree(card);
-}
-
-/*
- * An assumption for fw_card_put() is that the card driver allocates
- * the fw_card struct with kalloc and that it has been shut down
- * before the last ref is dropped.
- */
-void
-fw_card_put(struct fw_card *card)
-{
-       kref_put(&card->kref, release_card);
-}
-EXPORT_SYMBOL(fw_card_put);
-
 int
 fw_core_initiate_bus_reset(struct fw_card *card, int short_reset)
 {