firewire: clean up fw_card reference counting
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 24 May 2008 14:50:22 +0000 (16:50 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 14 Jul 2008 11:06:03 +0000 (13:06 +0200)
commit459f79235d8faa0050180c7e0c7bb4b2b52cbdfd
tree97847b1b06ded6c136cdba73bc961a46a3e39a30
parent2147ef204f57191e0fff6d5d3d1a0336afa6cfae
firewire: clean up fw_card reference counting

This is a functionally equivalent replacement of the current reference
counting of struct fw_card instances.  It only converts it to common
idioms as suggested by Kristian Høgsberg:
  - struct kref replaces atomic_t as the counter.
  - wait_for_completion is used to wait for all card users to complete.

BTW, it may make sense to count card->flush_timer and card->work as
card users too.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-card.c
drivers/firewire/fw-device.c
drivers/firewire/fw-transaction.h