diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2018-10-03 01:21:51 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-10-04 07:54:05 +0200 |
commit | a3aaf7d2bd388caea2bd0fba266b815ac708c49d (patch) | |
tree | b75b7285ca7fce6c05233924517c7af9be819e60 /sound/firewire/bebob/bebob_maudio.c | |
parent | ALSA: firewire: use managed-resource of fw unit device for private data (diff) | |
download | linux-a3aaf7d2bd388caea2bd0fba266b815ac708c49d.tar.xz linux-a3aaf7d2bd388caea2bd0fba266b815ac708c49d.zip |
ALSA: bebob: use managed-resource to maintain data specific to M-Audio FW-1814/ProjectMix I/O
ALSA bebob driver allocates memory object for data specific to M-Audio
FW-1884/ProjectMix I/O. The object is to maintain format of isochronous
packet payload for packet streaming by components for ALSA rawMIDI/PCM
interfaces. The object can be released as managed-resource of
'struct snd_card.card_dev'.
This commit uses managed-resource of the sound card device for this
purpose.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/bebob/bebob_maudio.c')
-rw-r--r-- | sound/firewire/bebob/bebob_maudio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/firewire/bebob/bebob_maudio.c b/sound/firewire/bebob/bebob_maudio.c index c266997ad299..51152ca4af57 100644 --- a/sound/firewire/bebob/bebob_maudio.c +++ b/sound/firewire/bebob/bebob_maudio.c @@ -261,8 +261,9 @@ snd_bebob_maudio_special_discover(struct snd_bebob *bebob, bool is1814) struct special_params *params; int err; - params = kzalloc(sizeof(struct special_params), GFP_KERNEL); - if (params == NULL) + params = devm_kzalloc(&bebob->card->card_dev, + sizeof(struct special_params), GFP_KERNEL); + if (!params) return -ENOMEM; mutex_lock(&bebob->mutex); |