diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-12-05 22:09:42 +0100 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2013-10-20 22:07:57 +0200 |
commit | 5ea4018e4321f24e8305ea8a8b0a9c3e270456ae (patch) | |
tree | 6b43404f690354f521a8b486b7d65999369738d2 /sound/firewire/dice.c | |
parent | a0301998aeebad206fa7e1b77300c9961c8c3d12 (diff) | |
download | lwn-5ea4018e4321f24e8305ea8a8b0a9c3e270456ae.tar.gz lwn-5ea4018e4321f24e8305ea8a8b0a9c3e270456ae.zip |
ALSA: dice: allow notifications during initialization
Reorganize the initialization order so that the driver can receive
notifications earlier.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/firewire/dice.c')
-rw-r--r-- | sound/firewire/dice.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sound/firewire/dice.c b/sound/firewire/dice.c index 06fef4752d50..49b47ba09cdd 100644 --- a/sound/firewire/dice.c +++ b/sound/firewire/dice.c @@ -924,10 +924,6 @@ static int dice_probe(struct fw_unit *unit, const struct ieee1394_device_id *id) dice->unit = unit; init_waitqueue_head(&dice->hwdep_wait); - err = dice_read_params(dice); - if (err < 0) - goto err_mutex; - dice->notification_handler.length = 4; dice->notification_handler.address_callback = dice_notification; dice->notification_handler.callback_data = dice; @@ -936,9 +932,17 @@ static int dice_probe(struct fw_unit *unit, const struct ieee1394_device_id *id) if (err < 0) goto err_mutex; - err = fw_iso_resources_init(&dice->resources, unit); + err = dice_owner_set(dice); if (err < 0) goto err_notification_handler; + + err = dice_read_params(dice); + if (err < 0) + goto err_owner; + + err = fw_iso_resources_init(&dice->resources, unit); + if (err < 0) + goto err_owner; dice->resources.channels_mask = 0x00000000ffffffffuLL; err = amdtp_out_stream_init(&dice->stream, unit, @@ -946,10 +950,6 @@ static int dice_probe(struct fw_unit *unit, const struct ieee1394_device_id *id) if (err < 0) goto err_resources; - err = dice_owner_set(dice); - if (err < 0) - goto err_stream; - card->private_free = dice_card_free; dice_card_strings(dice); @@ -983,10 +983,10 @@ static int dice_probe(struct fw_unit *unit, const struct ieee1394_device_id *id) return 0; -err_stream: - amdtp_out_stream_destroy(&dice->stream); err_resources: fw_iso_resources_destroy(&dice->resources); +err_owner: + dice_owner_clear(dice); err_notification_handler: fw_core_remove_address_handler(&dice->notification_handler); err_mutex: |