summaryrefslogtreecommitdiff
path: root/sound/firewire/isight.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2011-08-27 18:53:03 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2012-01-15 18:37:20 +0100
commit210762268466634ddbfaddb48fdf5181ce4b5f2d (patch)
tree8c07da360066158aa48f450dfeb593ed9ed76d0f /sound/firewire/isight.c
parent2ca526bf4953380abfe5dff455e356967b239c70 (diff)
firewire: move fw_device reference counting from drivers to core
fw_unit device drivers invariably need to talk to the fw_unit's parent (an fw_device) and grandparent (an fw_card). firewire-core already maintains an fw_card reference for the entire lifetime of an fw_device. Likewise, let firewire-core maintain an fw_device reference for the entire lifetime of an fw_unit so that fw_unit drivers don't have to. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'sound/firewire/isight.c')
-rw-r--r--sound/firewire/isight.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c
index 440030818db7..412b65f740d9 100644
--- a/sound/firewire/isight.c
+++ b/sound/firewire/isight.c
@@ -612,7 +612,6 @@ static void isight_card_free(struct snd_card *card)
fw_iso_resources_destroy(&isight->resources);
fw_unit_put(isight->unit);
- fw_device_put(isight->device);
mutex_destroy(&isight->mutex);
}
@@ -645,7 +644,7 @@ static int isight_probe(struct device *unit_dev)
isight->card = card;
mutex_init(&isight->mutex);
isight->unit = fw_unit_get(unit);
- isight->device = fw_device_get(fw_dev);
+ isight->device = fw_dev;
isight->audio_base = get_unit_base(unit);
if (!isight->audio_base) {
dev_err(&unit->device, "audio unit base not found\n");
@@ -682,7 +681,6 @@ static int isight_probe(struct device *unit_dev)
err_unit:
fw_unit_put(isight->unit);
- fw_device_put(isight->device);
mutex_destroy(&isight->mutex);
error:
snd_card_free(card);