aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-device.c
diff options
context:
space:
mode:
authorJay Fenlason <fenlason@redhat.com>2008-11-29 11:44:57 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-01-04 17:50:37 -0500
commit0fa1986f3a6c385b3bca0b6a051c30e548bda30d (patch)
tree5b61ce9579a520f89bc4c000bfe3496e58d4f47a /drivers/firewire/fw-device.c
parent2cc489c21338950c2b4097dec48864bdf7b30f1b (diff)
firewire: improve refcounting of fw_card
Take a reference to the card whenever fw_card_bm_work() is scheduled on that card and release it when the work is done. This allows us to remove the cancel_delayed_work_sync() in fw_core_remove_card(). Signed-off-by: Jay Fenlason <fenlason@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (patch update)
Diffstat (limited to 'drivers/firewire/fw-device.c')
-rw-r--r--drivers/firewire/fw-device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c
index 31b6c74d34df..c173be383725 100644
--- a/drivers/firewire/fw-device.c
+++ b/drivers/firewire/fw-device.c
@@ -689,7 +689,7 @@ static void fw_device_init(struct work_struct *work)
689 fw_notify("giving up on config rom for node id %x\n", 689 fw_notify("giving up on config rom for node id %x\n",
690 device->node_id); 690 device->node_id);
691 if (device->node == device->card->root_node) 691 if (device->node == device->card->root_node)
692 schedule_delayed_work(&device->card->work, 0); 692 fw_schedule_bm_work(device->card, 0);
693 fw_device_release(&device->device); 693 fw_device_release(&device->device);
694 } 694 }
695 return; 695 return;
@@ -758,7 +758,7 @@ static void fw_device_init(struct work_struct *work)
758 * pretty harmless. 758 * pretty harmless.
759 */ 759 */
760 if (device->node == device->card->root_node) 760 if (device->node == device->card->root_node)
761 schedule_delayed_work(&device->card->work, 0); 761 fw_schedule_bm_work(device->card, 0);
762 762
763 return; 763 return;
764 764
@@ -892,7 +892,7 @@ static void fw_device_refresh(struct work_struct *work)
892 fw_device_shutdown(work); 892 fw_device_shutdown(work);
893 out: 893 out:
894 if (node_id == card->root_node->node_id) 894 if (node_id == card->root_node->node_id)
895 schedule_delayed_work(&card->work, 0); 895 fw_schedule_bm_work(card, 0);
896} 896}
897 897
898void fw_node_event(struct fw_card *card, struct fw_node *node, int event) 898void fw_node_event(struct fw_card *card, struct fw_node *node, int event)